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.

find window and sending shortcuts/emulate keystroke

If you have a question or need help, this is the place to be.
Post Reply
Stalltime
Posts: 29
Joined: Tue Feb 19, 2013 2:07 am

find window and sending shortcuts/emulate keystroke

Post by Stalltime »

hi

I am having a problem with the finding window and sending a keyboard shortcut.

So for an example I did a macro which does the following:

find a window: Notepad.exe
bring to front
Wait: 2.09 sec
Emulate Keystrokes: {x}

everything works in my simple macro except sending the keystroke: x

Can anyone help me please?
I am using event ghost version:0.4.1.r1710

Thanks
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: find window and sending shortcuts/emulate keystroke

Post by kgschlosser »

Ok. Instead of identifying notepad in general. You should be able to expand notepad in the find window action. You will want to locate the actual text control inside of notepad
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: find window and sending shortcuts/emulate keystroke

Post by kgschlosser »

Forgot to mention. If you locate the actual text control there is no need to bring the window to the front anymore either. The handle for the text control will automatically get passed to the keyboard emulator and that handle is what the emulator will use to identify where to send the keystrokes to
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: find window and sending shortcuts/emulate keystroke

Post by kgschlosser »

your setting for the find window should look like the following make sure you have the WindowName box unchecked. unless there is a specific document edit you are looking to only have the macro work on.
also set the Wait up to 1.0 seconds
notepad.jpg
If you like the work I have been doing then feel free to Image
Stalltime
Posts: 29
Joined: Tue Feb 19, 2013 2:07 am

Re: find window and sending shortcuts/emulate keystroke

Post by Stalltime »

thank you guys, it works. :)
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: find window and sending shortcuts/emulate keystroke

Post by kgschlosser »

no worries m8. that's what we are here for 8)
If you like the work I have been doing then feel free to Image
Post Reply