boogieoompa Posted August 2, 2005 Share Posted August 2, 2005 I am still very new to auto it and I have come across a little problem. I basically want to set a letter (without ctrl, alt, shift) to a hotkey that will only activate in one app. If that app is not active then I want it to send the key normally right now however the program gets caught in a loop it sends the letter which in turns starts the function which inturn sends the letter... Any suggestions HotKeySet("i", "FunInverse") Func FunInverse() If WinActive("VMonitor") Then mouseclick("Right") Send("It worked!") Else Send("i") Endif EndFunc Link to comment Share on other sites More sharing options...
this-is-me Posted August 2, 2005 Share Posted August 2, 2005 Yep. Read the helpfile. It says: HotKeySet("{Esc}", "captureEsc") Func captureEsc() ; ... can do stuff here HotKeySet("{Esc}") Send("{Esc}") HotKeySet("{Esc}", "captureEsc") EndFunc Who else would I be? Link to comment Share on other sites More sharing options...
Valuater Posted August 2, 2005 Share Posted August 2, 2005 Like this HotKeySet("i", "FunInverse") While 1 Sleep(100) WEnd Func FunInverse() If WinActive("VMonitor") Then mouseclick("Right") Send("It worked!") Else HotKeySet("i") Send("i") HotKeySet("i", "FunInverse") Endif EndFunc Hope it helps 8) 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