Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Sending a keystroke to unfocused application
Sending a keystroke to unfocused application
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.
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.
- Bitmonster
- Site Admin
- Posts: 2239
- Joined: Mon Feb 06, 2006 10:28 pm
Re: Sending a keystroke to unfocused application
Please post the full macro here between CODE tags.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
Re: Sending a keystroke to unfocused application
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?
- Bitmonster
- Site Admin
- Posts: 2239
- Joined: Mon Feb 06, 2006 10:28 pm
Re: Sending a keystroke to unfocused application
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.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
Re: Sending a keystroke to unfocused application
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
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.
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
<?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>
<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>
- Bitmonster
- Site Admin
- Posts: 2239
- Joined: Mon Feb 06, 2006 10:28 pm
Re: Sending a keystroke to unfocused application
The macro looks OK so far. Which application receives the keystroke simultaneous to foobar2k?
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
Re: Sending a keystroke to unfocused application
Opera web browser.
- Bitmonster
- Site Admin
- Posts: 2239
- Joined: Mon Feb 06, 2006 10:28 pm
Re: Sending a keystroke to unfocused application
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?
BTW: Why don't you use the foobar-plugin?
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
Re: Sending a keystroke to unfocused application
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.
- Bitmonster
- Site Admin
- Posts: 2239
- Joined: Mon Feb 06, 2006 10:28 pm
Re: Sending a keystroke to unfocused application
Have you set the installation path to foobar correctly in the plugin?
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!