GKWong Posted March 12, 2008 Share Posted March 12, 2008 I got a problem with this script:-WinWaitActive("Document - WordPad")HotKeySet("{End}","MyExit")HotKeySet("{PGUP}","BlueTxt")Func MyExit() ExitEndFuncFunc BlueTxt() Send("Hello World{Enter}")EndFuncWhat i am trying to do is if WordPad is running, then if i press PageUp key, it will type Hello World and then press Enter. If End key is press then it will exit.But the main problem is the script auto exit when WordPad is active. How to solve this? Link to comment Share on other sites More sharing options...
Aassdd Posted March 12, 2008 Share Posted March 12, 2008 WinWaitActive("Document - WordPad") HotKeySet("{End}","MyExit") HotKeySet("{PGUP}","BlueTxt") While 1 Sleep(100) WEnd Func MyExit() Exit EndFunc Func BlueTxt() Send("Hello World{Enter}") EndFunc 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