Pausing?
#1
Posted 08 February 2004 - 04:25 PM
sorry if my english is bad.
#2
Posted 08 February 2004 - 04:35 PM
what do you means with "pause"?Ive put together my own script, sence most of the decent ones have been taken down. But after looking at some of the other scripts with pause, i just get more confused. Could you tell me how to do?
sorry if my english is bad.
Hitting key which stops the execution or letting the script pause for a given period or something else ?
Visit the SciTE4AutoIt3 Download page for the latest versions Forum Rules
Live for the present,
Dream of the future,
Learn from the past.
#3
Posted 08 February 2004 - 04:38 PM
#4
Posted 08 February 2004 - 04:47 PM
edit: update the example a bit..
Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") While 1;infinite loop sleep(100) SplashTextOn("pauseSpecialScrn", "Running") ; stuff to do goes here ... Wend Func TogglePause() $Paused = NOT $Paused SplashTextOn("pauseSpecialScrn", "Pausing") while $Paused sleep(100) Wend EndFunc Func Terminate() MsgBox(4096,"", "The End") Exit EndFunc
Edited by JdeB, 08 February 2004 - 04:57 PM.
Visit the SciTE4AutoIt3 Download page for the latest versions Forum Rules
Live for the present,
Dream of the future,
Learn from the past.
#5
Posted 08 February 2004 - 04:54 PM
#6
Posted 08 February 2004 - 07:59 PM
This is how my pause script works:
In game make the following macros:
CTRL+1 => Name it START
Alt+1 => Name it STOP
this is checks to see if you are holding ALT down:
If CheckPixel(31, 37, 56, 44, 66, 39, 0, 0, 0) = 1 Then
$Paused = 1
SoundPlay ("chord.wav",1)
Sleep(100)
SoundPlay ("chord.wav",1)
EndIf
If you are holding ALT down then the game says stop in the upper left corner. the checkpixel function is one that i made. you should use the PixelGetColor function.
So now that the the Pause is detected i have a loop that waits for you to press CTRL to start it again.
While $paused = 1
Sleep(6000)
If CheckPixel(31, 37, 56, 34, 61, 44, 73, 43, 0) = 1 Then
$Paused = 0
SoundPlay ("chord.wav",1)
Sleep(100)
SoundPlay ("chord.wav",1)
EndIf
WEnd
this unpauses the script when it detects "START" in the upper left corner
-Sotaru
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users




