SirJohann Posted June 7, 2014 Posted June 7, 2014 (edited) Hi guys, I was writing this simple code and I found that some weird happens. Please, ignore the code, I was just joking with friends.ToolTip('Press space to start the wiggle <3' & @CRLF & _ 'Press escape to stop the wiggle :(', 0, 0, 'WIGGLE WIGGLE WIGGLE', 0, 100) HotKeySet('{SPACE}', '_WiggleWiggleWiggle') HotKeySet('{ESC}', '_DontWiggleWiggleWiggle') Global $Wiggle = 0 Global $WiggleWiggle = '' Sleep(4000) While True Sleep(100) WEnd Func _WiggleWiggleWiggle() ToolTip('') While True For $Wiggle = 1 To Random(1, 5, 1) $WiggleWiggle &= 'WIGGLE ' Next Send($WiggleWiggle) Send('{ENTER}') $WiggleWiggle = '' Sleep(300) MsgBox(64, 'Title', $WiggleWiggle) WEnd EndFunc Func _DontWiggleWiggleWiggle() Exit EndFuncThe bug is in the first function, and the cause is the space next to 'WIGGLE', If I write the space, the msgbox and the rest of the function is not called, and without the space it is. I really can't undestand why. Edited June 7, 2014 by Melba23 Amended title Codes codes codes.
Developers Solution Jos Posted June 7, 2014 Developers Solution Posted June 7, 2014 You need to stop the HotKey for space or else you fire the func each time to send a space. Add this to the top of the first func: HotKeySet('{SPACE}') Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
SirJohann Posted June 7, 2014 Author Posted June 7, 2014 (edited) Oh, thanks Edited June 7, 2014 by SirJohann Codes codes codes.
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