Rabbitman Posted December 14, 2010 Share Posted December 14, 2010 (edited) OMG help me please i have been trying for hours and i cant do this.I have multiple hotkeys but i dont know how to put them into one script. And i dont know how to make it not start when i open it up, but wait for me to press a hotkey. And i dont know how to completely stop a script with a hotkey, instead of pausing it. And i dont know how to get this to work. I have been trying for weeks and... > I am using the script from the helpfile and editing it, and if i put just one it works. But if i put 2 it doesnt work. And i know you can only have one hotkey running at a time, but i have 7 and i dont know how to make it stop instead of pause so i can use another hotkey. Please help me!!! I just deleted everything so i cant provide my code... Edited December 15, 2010 by Rabbitman Link to comment Share on other sites More sharing options...
Rabbitman Posted December 15, 2010 Author Share Posted December 15, 2010 Edited Link to comment Share on other sites More sharing options...
Rabbitman Posted December 15, 2010 Author Share Posted December 15, 2010 Here is my script: expandcollapse popupGlobal $Paused ;First Variable Global $Paused_2 ;Second Variable HotKeySet("{PAUSE}", "TogglePause");For first script, it will toggle the pause on that one HotKeySet("{-}", "Hello") ;Second Script, it will toggle the pause on that one HotKeySet("{ESC}", "Terminate");Exit While 1 $msg = GUIGetMsg() While 1=1 ;Just sends "z" Send("{Z down}") Sleep(10) Send("{Z up}") Sleep(10) WEnd WEnd While 1 Sleep(100) WEnd ;;;;;;;; Func TogglePause() ;Toggles pause for first one $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate();Exit hotkey Exit 0 EndFunc While 1=1 Send("HELLO This is a test") WEnd While 1 Sleep(100) WEnd Func Hello() $Paused_2 = NOT $Paused_2 ;Toggles pause for second one While $Paused_2 sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Now i think i know one thing that is wrong, its that my second code isnt in the while loop with GuiGetMsg(). I have known that but dont know where to put it in so that it will react to the other hotkey?!. Link to comment Share on other sites More sharing options...
enaiman Posted December 15, 2010 Share Posted December 15, 2010 Please, do not bump your post within 24 hours (you did it twice in this thread). If anybody would like to answer your post, they will, IF they have time and IF they want to help YOU. Having an aggressive atitude and snapping at people has never won any friends (been reading your past threads). SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
Zedna Posted December 15, 2010 Share Posted December 15, 2010 Help me Please i need this finished in 2 days!!Then go to rentacoder server! Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Developers Jos Posted December 15, 2010 Developers Share Posted December 15, 2010 (edited) This is your script tidied with the /sf param. do you have a while---wend tunnel-vision syndrome or something? What on earth is this supposed to do? ... and you are sure you have been trying for weeks ....right? Maybe first step is to read up on what a While...wend loop actually does. expandcollapse popup#tidy_parameters=/sf Global $Paused ;First Variable Global $Paused_2 ;Second Variable HotKeySet("{PAUSE}", "TogglePause");For first script, it will toggle the pause on that one HotKeySet("{-}", "Hello") ;Second Script, it will toggle the pause on that one HotKeySet("{ESC}", "Terminate");Exit While 1 $msg = GUIGetMsg() While 1 = 1 ;Just sends "z" Send("{Z down}") Sleep(10) Send("{Z up}") Sleep(10) WEnd WEnd ; While 1 Sleep(100) WEnd ; While 1 = 1 Send("HELLO This is a test") WEnd ; While 1 Sleep(100) WEnd ; Func Hello() $Paused_2 = Not $Paused_2 ;Toggles pause for second one While $Paused_2 Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>Hello Func Terminate();Exit hotkey Exit 0 EndFunc ;==>Terminate ;;;;;;;; Func TogglePause() ;Toggles pause for first one $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause Edited December 15, 2010 by 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. 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