Orgins Posted February 8, 2007 Posted February 8, 2007 (edited) So is it just me or can no one send it in a func? HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("6", "Six") $value = 6 While 1 Sleep(100) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func Six() $i = 0 Do Send($value) $i = $i + 1 Until $i = 100 EndFunc Edited February 8, 2007 by Orgins I'm a newbie.Sorry if I don't reposed to your replays very fast.
Helge Posted February 8, 2007 Posted February 8, 2007 Send(6) triggers the hotkey again ! As mentioned in the helpfile... To Send() a key combination which will trigger a HotKeySet() event, either use ControlSend() or unregister the HotKeySet() event, otherwise, the Send() event may trigger an infinite loop. HotKeySet("6", "Send6") Send6() Func Send6() HotKeySet("6") Send(6) HotKeySet("6", "Send6") EndFunc
Orgins Posted February 8, 2007 Author Posted February 8, 2007 oooooo. Didn't think about that. My bad I'm a newbie.Sorry if I don't reposed to your replays very fast.
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