1. sendkeys.ew
- Posted by tone.skoda at gmx.net
Jan 22, 2003
I'm having one problem:
I don't know how to send ALT+F4 keys pressed at the same time (to close
foreground window).
Or just F2 key.
2. Re: sendkeys.ew
> I'm having one problem:
> I don't know how to send ALT+F4 keys pressed at the same time (to close
> foreground window).
> Or just F2 key.
Hi,
Just looked at the code, it isn't possible to send function keys with
it as it is but it's a quite an easy feature to add.
You need to add entries for each function key to the NAMED_KEYS sequence at the
top of
sendkeys.ew, they should look like:
{"f1", #70}, -- VK_F1
{"f2", #71}, -- VK_F2
And so on (up to f24 for which the code is #87).
Then you should be able to send ALT-F4 like this:
SendKeys("%{f4}")
However, if you just want to close other applications then have a look
at my window finding functions
(http://www.rat-software.com/projects.html#window). That's got a
function for closing a window given its HWND (which you can using the
windows caption with the other functions in that file).
Thomas Parslow (PatRat)
E-Mail/Jabber: tom at almostobsolete.net
ICQ: 26359483