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.

Dsabled newbie; needs help with keyboard emulation...

If you have a question or need help, this is the place to be.
Post Reply
dturley
Posts: 1
Joined: Tue Jan 13, 2009 7:28 pm

Dsabled newbie; needs help with keyboard emulation...

Post by dturley »

usig latest beta and USB-UIRT. ALL works well except one thing... must be me!

trying to auto load plylist, when i put keyboard emulation in a multi-action macro the file/open box opens, cursor blinking in correct spot, but thats all, it stops.
if i make 2 macros; one to 'open file', and a second with only the keyboard emulation [party1.m3u] then it fils in??

i'm disabled w/ALS, my hands barely work and i dont want to hit 2 buttons for every keyboard emulation. what am i doing wrong?

tred both zoom and winamp - same...
bskchaos
Experienced User
Posts: 56
Joined: Tue Mar 25, 2008 3:04 pm

Re: Dsabled newbie; needs help with keyboard emulation...

Post by bskchaos »

you should try WACommand
http://nunzioweb.com/daz/WACommand/

It is far better than a complex macro.
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Dsabled newbie; needs help with keyboard emulation...

Post by Bitmonster »

bskchaos is right, that you should prefer to avoid emulating keystrokes as much as you can, because this can easily get unreliable. For Zoom Player you can for example give the file through the command line, thus the "Start Application" action.

But if you have no alternative, you can try two things in these situations:

1. Split the keystroke emulation into two actions and add a little pause between them. Every time a keystroke action takes place, EventGhost will try to find the front-most window first. If this window changes while keystrokes are emulated, they might got sent to the wrong window (or better say: not to the window you expected). So first make an action to open the open file dialog, then wait some time and in the final step let it type the filename.

2. Even better, use the "Find Window" action before each keystroke emulation, to state explicitly the right window that should receive the keystrokes. This will also give you the option to wait for the right dialog to pop up and might even work if the window is not the front-most.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Dsabled newbie; needs help with keyboard emulation...

Post by Bitmonster »

Here is an example of the second approach:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1488">
    <Macro Name="Open party1.m3u" Expanded="True">
        <Action>
            Window.FindWindow(u'winamp.exe', None, None, None, None, None, False, 0.0, 0)
        </Action>
        <Action>
            Window.BringToFront()
        </Action>
        <Action>
            Window.SendKeys(u'l', False)
        </Action>
        <Action>
            Window.FindWindow(u'winamp.exe', None, u'#32770', u'', u'Edit', 1, False, 3.0, 0)
        </Action>
        <Action>
            Window.SendKeys(u'party1.m3u', False)
        </Action>
    </Macro>
</EventGhost>
Just copy everything inside the box and paste it to your tree somewhere.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
Post Reply