Jump to content

How to capture *and* let through Alt+Tab?


Recommended Posts

G'day everyone

I want users of my script to be able to change windows using Alt+Tab, but I also want the script to perform a function when the user presses Alt+Tab. How can I do it?

HotKeySet ("!{TAB}", "AltTab")

While 1
Sleep ("100")
WEnd

Func AltTab()
Send ("!{TAB}")
DO SOMETHING ELSE ALSO
EndFunc

The above does not work. It sends Alt+Tab but it does not activate the window changer that is normally associated with Alt+Tab. Alternatively, if that window changer has a name (in Windows XP or elsewhere) and I can "run" it, can anyone tell me how to do it?

Thanks

Samuel

Link to comment
Share on other sites

Try the function coded like this. It disables the hotkey, sends the keystroke again, then sets the hotkey back to the way it was.

Func AltTab()
 HotKeySet("!{TAB}")
 Send("!{TAB}")
 ;DO SOMETHING ELSE ALSO
 HotKeySet ("!{TAB}", "AltTab")
EndFunc
Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...