PcExpert Posted March 28, 2006 Posted March 28, 2006 Hello, I've made a script, but it's not working. What is wrong? HotKeySet("{PRINTSCREEN}", "MyFunction")BlockInput(1)Run("Notepad.exe")WinWaitActive("Notepad")Send("Hello, How are you? This is a test") Func MyFunction() BlockInput(0)EndFunc Thanks, PcExpert
BigDod Posted March 28, 2006 Posted March 28, 2006 WinWaitActive("Notepad") should be WinWaitActive("Untitled") but the block input will block you from using any HotKeys. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
PcExpert Posted March 28, 2006 Author Posted March 28, 2006 (edited) Ok, thanks. So that means that you cannot stop a script from being excuted? Edited March 28, 2006 by PcExpert
BigDod Posted March 28, 2006 Posted March 28, 2006 Ok, thanks. So that means that you cannot stop a script from being excuted?You can block input but you have to remember to unblock it. BlockInput(1) Run("Notepad.exe") WinWaitActive("Untitled") Send("Hello, How are you? This is a test") BlockInput(0) Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
PcExpert Posted March 28, 2006 Author Posted March 28, 2006 (edited) But I can't assign a hotkey to it? And there's no other way to do it? Edited March 28, 2006 by PcExpert
Moderators SmOke_N Posted March 28, 2006 Moderators Posted March 28, 2006 (edited) But I can't assign a hotkey to it? And there's no other way to do it?Not if your going to block the keys from use (external stopping that is). You could always use the Ctrl+Alt+Del method, and in the script if ProcessExists('tskmgr.exe') or something, then exit or unblock that way.Edit:Or use some type of timing method.These are internal ideas only. Edited March 28, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
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