Reinhardt1julian Posted March 3, 2013 Posted March 3, 2013 i have a hotkey set which will run a function, to add 1 to a variable. but i have a loop to show a tray menu, and let the items do something. when the hotkey is pressed, the loop ends.
Nessie Posted March 3, 2013 Posted March 3, 2013 Something like that: $Flag = False HotKeySet("{ESC}", "Terminate") Do ConsoleWrite("a" & @CRLF) Until $flag = True Func Terminate() $flag = True EndFunc Hi! My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s). My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all! My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file
kylomas Posted March 3, 2013 Posted March 3, 2013 R1j,Is this the problem?when the hotkey is pressed, the loop ends.If so, post the code...kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill
Reinhardt1julian Posted March 3, 2013 Author Posted March 3, 2013 Global $a=0 HotKeySet("a", "_a") Opt("TrayMenuMode", 1) ; Default tray menu items (Script Paused/Exit) will not be shown. Local $A= TrayCreateItem("A") TrayCreateItem("") Local $B= TrayCreateItem("B") TraySetState() While 1 Global $msg = TrayGetMsg() Select Case $msg = 0 ContinueLoop Case $msg = $A MsgBox(0,"","A") Case $msg = $B Exit EndSelect WEnd Func _a() $a=$a+1 Send("a") EndFunc
kylomas Posted March 3, 2013 Posted March 3, 2013 Is this related to thread?kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill
Recommended Posts