dorkbrains Posted May 20, 2009 Share Posted May 20, 2009 In my script, i have inserted a "pause" and once you activate the pause you have an option to change the settings in the function that has been running. However, it only sets these settings in the pause function. So what i am wondering is if there is a way to tell it to go back to a certain line in the entire script after completing the pause function? Let me know if you need the script or if you need a better explanation. Thanks <i have searched but i have also been known to fail really hard at using the search feature, so i am sorry if i did that this time too > Link to comment Share on other sites More sharing options...
enaiman Posted May 20, 2009 Share Posted May 20, 2009 Do a search for "pause" or "unpause" (use the option to search in titles) and you'll find a solution. About setting some variables: use global variables (so they will be known everywhere). 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...
mbkowns Posted May 20, 2009 Share Posted May 20, 2009 OR just use fuctions. Link to comment Share on other sites More sharing options...
dorkbrains Posted May 20, 2009 Author Share Posted May 20, 2009 Do a search for "pause" or "unpause" (use the option to search in titles) and you'll find a solution. About setting some variables: use global variables (so they will be known everywhere). ok here is the script, i hope this will help me explain (i tried global and i cant get it to work) expandcollapse popuplobal $Paused = True HotKeySet("{HOME}","startwatch") HotKeySet("{END}","stop") HotKeySet("{PAUSE}","pause") MsgBox(0,"Instructions","Commands" & @CRLF & "Home Key = Start Script" & @CRLF & "End Key = Stop Script" & @CRLF & "Pause Key = Toggles Pause" & @CRLF & "" & @CRLF & "NOTE: If you close any message box other than by clicking 'OK' the script WILL terminate.") While 1 Sleep(100) WEnd Func startwatch() $bloop = 1 While $bloop = 1 $sleep = InputBox("Refresh Rate","In seconds, about how fast does your computer update the galaxy view screen. (Estimate and round UP!!)") If @error = 1 Then Exit 0 ElseIf $sleep = 0 Then MsgBox(0,"Invalid","Please enter an number above 0") Else If $sleep > 3 Then MsgBox(0,"WOW!","Your internet/computer fucking sucks. I do not think that debris watching is made out for you. Dumbass.") If $setup <> 1 Then Exit 0 EndIf Else $bloop = 0 EndIf EndIf WEnd $setup = MsgBox(0,"Setup","Complete the following checklist in order to start watching the debris." & @CRLF & "1. Make sure you are using firefox." & @CRLF & "2. Enable the Highlight Big Debris function in foxgame, set the color to #FF0000 and the minimal debris size to 0." & @CRLF & "3. Make sure you are in the desired debris fields' system." & @CRLF & "4. Make sure that the find text when typing feature in firefox options is ENABLED." & @CRLF & "5. SYNC YOUR FUCKING CLOCK!!!") If $setup <> 1 Then Exit 0 EndIf $dontfup = MsgBox(0,"DONT FUCK UP","After hitting ok, place the point of the mouse in the RED section of the debris field, you will have 10 seconds to do so. For more caution, click the spot that you want to be watched.") If $dontfup <> 1 Then Exit 0 EndIf Sleep(10000) $pos = MouseGetPos() $starting = MsgBox(0,"Starting","Debris Field Watch has started, Good Luck." & @CRLF & "" & @CRLF & "Press the Pause key in order to pause while refreshing, press it again to start scanning again. (The first time you press the pause key, you must hit it twice in order for it to activate.)") If $starting <> 1 Then Exit 0 EndIf Sleep(500) $point = PixelGetColor($pos[0],$pos[1]) MouseClick("left",$pos[0],$pos[1]) $aloop = 1 While $aloop = 1 If $point = 16711680 Then Opt("WinTitleMatchMode", 2) WinActivate("Mozilla Firefox") Sleep(200) Send("System") Send("{TAB DOWN}") Send("{TAB UP}") Sleep(100) Send("{TAB DOWN}") Send("{TAB UP}") Sleep(100) Send("{TAB DOWN}") Send("{TAB UP}") Sleep(100) Send("{ENTER DOWN}") Send("{ENTER UP}") Send("{PRINTSCREEN DOWN}") Send("{PRINTSCREEN UP}") Sleep(($sleep * 1000) - 500) $point = PixelGetColor($pos[0],$pos[1]) Else $aloop = 0 MsgBox(0,"Done!","Screenshot taken! Open paint and paste into a new document to see the screenshot and then ... go own some bitches!!!") EndIf WEnd EndFunc Func pause() $paused = NOT $paused Opt("WinTitleMatchMode", 2) WinActivate("Mozilla Firefox") $afterpause = MsgBox(4,"New Spot?","Has the planet position changed from the previous position?") If $afterpause = 6 Then $dontfup = MsgBox(0,"DONT FUCK UP","After hitting ok, place the point of the mouse in the RED section of the debris field, you will have 10 seconds to do so. For more caution, click the spot that you want to be watched.") If $dontfup <> 1 Then Exit 0 EndIf Sleep(10000) $pos = MouseGetPos() EndIf While $paused Sleep(100) WEnd EndFunc Func stop() Exit 0 EndFunc basically what this thing does, is scan something on the computer screen until the pixel of a selected spot changes. now, the user has the option to pause the script so that they can use aim or w.e. but also so if they found out that they are watching the wrong spot on the screen, they can fix it. therefore i added that ability to the pause function at the bottom i tried adding up at the top under Global $paused = True the phrase "Global $pos" so that the position given in the pause function would carry through, but it did not. do you see a flaw in this that i dont? thank you for the help Link to comment Share on other sites More sharing options...
dorkbrains Posted May 20, 2009 Author Share Posted May 20, 2009 um...im an idiot... i have fixed all issues, sorry to waste people's time xD 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