Page 1 of 2
Sending a keystroke to unfocused application
Posted: Tue Jul 03, 2007 12:53 pm
by GOnzo
Hallo to everybody,
I'm sory for that simple question, but I'm new in EG. Can I control with remote controler unfocused application? Situation is simple, my wife is running browser, I listening a music, but I want to change tracks etc.
Posted: Tue Jul 03, 2007 12:55 pm
by Bartman
Just add a find window action at the beginning of the makros.
Posted: Tue Jul 03, 2007 1:06 pm
by GOnzo
Bartman wrote:Just add a find window action at the beginning of the makros.
A yes, It was too easy. Thanks a lot.
Posted: Tue Jul 03, 2007 1:46 pm
by GOnzo
Sorry but, I got one problem more. When I send a keystroke to unfocused application, it also goes to focused application. How to disable it?
Re: Sending a keystroke to unfocused application
Posted: Thu Jul 05, 2007 7:39 pm
by Bitmonster
Please post the full macro here between CODE tags.
Re: Sending a keystroke to unfocused application
Posted: Thu Jul 05, 2007 8:56 pm
by GOnzo
Maby I used wrong words. I'd like to know, it is possible to direct an emulation of keystroke (from remote controller) just to one application. Becouse it is normal, when I send an emulation of keystroke to unfocused application it also goes to focused application, which could have also a key assignment. More simply ->> I push next button on my remote --> hidden music player plays next song --> focused web browser goes to the next page (and I don't want it to do that). For now my macro consist of: Event Forward form remote, Find window of music player, Emulate keystroke. So, how to send an emulation of keystroke only to music player?
Re: Sending a keystroke to unfocused application
Posted: Thu Jul 05, 2007 10:51 pm
by Bitmonster
If the macro has a FindWindow first, the keystroke should go to this application solely. So either the macro isn't configured right or the other application in front grabs them even though it shouldn't (by not handling window messages right) or EG has a bug. So please post an example macro between CODE tags, so we can see what is happening.
Re: Sending a keystroke to unfocused application
Posted: Fri Jul 06, 2007 12:21 pm
by GOnzo
I don't know what you mean as 'CODE tags'. I didn't make any python programming, so I don't have any code if you mean this. A macro consist of 'find window' and 'emulate keystyroke' items only. Find window point to foobar and emulate keystroke get 'v' in configuration form, thats it. I don't know how to get its CODE.
Re: Sending a keystroke to unfocused application
Posted: Fri Jul 06, 2007 12:24 pm
by Bartman
Choose the macro in the tree and press Ctrl+C to copy it to the clipboard.
Then reply to this topic and hit the code button and then press ctrl+v to insert it. The code tags have be used, so that the formatting stay intact.
Re: Sending a keystroke to unfocused application
Posted: Fri Jul 06, 2007 1:16 pm
by GOnzo
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="908">
<Macro Name="Next Track" Expanded="True">
<Event Name="X10.Forward">
</Event>
<Action>
Window.FindWindow(u'foobar2000.exe', None, None, None, None, None, False, 0.0, 0)
</Action>
<Action>
Window.SendKeys(u'v', True)
</Action>
</Macro>
</EventGhost>
Re: Sending a keystroke to unfocused application
Posted: Fri Jul 06, 2007 3:10 pm
by Bitmonster
The macro looks OK so far. Which application receives the keystroke simultaneous to foobar2k?
Re: Sending a keystroke to unfocused application
Posted: Fri Jul 06, 2007 6:43 pm
by GOnzo
Opera web browser.
Re: Sending a keystroke to unfocused application
Posted: Fri Jul 06, 2007 7:37 pm
by Bitmonster
I remember someone has posted a similiar problem with the opera browser. It seems this is one of the applications, that don't use Windows messages as it should and polls the low-level keyboard-state instead.
BTW: Why don't you use the foobar-plugin?
Re: Sending a keystroke to unfocused application
Posted: Fri Jul 06, 2007 8:42 pm
by GOnzo
yes, I know that there is a foobar plugin, even I put it in autostart tree node, but I don't know how to activate it. In that state it do nothing. I was looking for any help for plugins but I didn't found.
Re: Sending a keystroke to unfocused application
Posted: Thu Jul 19, 2007 2:45 pm
by Bitmonster
Have you set the installation path to foobar correctly in the plugin?