1. 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.

new topic     » topic index » view message » categorize

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu