leuce Posted May 16, 2010 Share Posted May 16, 2010 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 More sharing options...
JohnOne Posted May 16, 2010 Share Posted May 16, 2010 Worth having a look at the hotkey udf by Yashied AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted May 16, 2010 Share Posted May 16, 2010 (edited) 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 May 16, 2010 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now