HankHell Posted February 16, 2018 Share Posted February 16, 2018 (edited) ran into this weird little thing, was wondering if someone could explain this to me ReplaceKeys() while 1 sleep(50) WEnd Func ReplaceWith1() Send("g") EndFunc Func ReplaceKeys() HotKeySet("g", "ReplaceWith1") EndFunc for whatever reason, this does not work Edited February 16, 2018 by HankHell Link to comment Share on other sites More sharing options...
SlackerAl Posted February 16, 2018 Share Posted February 16, 2018 Are you sure that is what you want to happen? You are asking the script to wait until "g" is pressed and then get stuck in an endless loop of pressing "g". I just ran this: ReplaceKeys() while 1 sleep(50) WEnd Func ReplaceWith1() MsgBox(0,"test","here") Send("g") EndFunc Func ReplaceKeys() HotKeySet("g", "ReplaceWith1") EndFunc And it behaves as I would expect. What do you mean by "does not work"? Problem solving step 1: Write a simple, self-contained, running, replicator of your problem. Link to comment Share on other sites More sharing options...
JohnOne Posted February 16, 2018 Share Posted February 16, 2018 Func ReplaceWith1() HotKeySet("g", "") Send("g") HotKeySet("g", "ReplaceWith1") EndFunc 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...
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