Jump to content



Photo

Pausing?


  • Please log in to reply
5 replies to this topic

#1 CrimsonJack

CrimsonJack

    Seeker

  • Active Members
  • 12 posts

Posted 08 February 2004 - 04:25 PM

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.





#2 Jos

Jos

    oh joy ...

  • Developers
  • 21,057 posts

Posted 08 February 2004 - 04:35 PM

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.

what do you means with "pause"?
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 CrimsonJack

CrimsonJack

    Seeker

  • Active Members
  • 12 posts

Posted 08 February 2004 - 04:38 PM

Pausing a script ingame. And being able to unpause ingame. While fishing, i can pause, buy bait, return, and unpause.

#4 Jos

Jos

    oh joy ...

  • Developers
  • 21,057 posts

Posted 08 February 2004 - 04:47 PM

This is an example (partly from the helpfile) that toggles the Pause with the pause key.. the ESC key exits the script

edit: update the example a bit..

Plain Text         
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 CrimsonJack

CrimsonJack

    Seeker

  • Active Members
  • 12 posts

Posted 08 February 2004 - 04:54 PM

Thank you :whistle:

#6 Sotaru

Sotaru

    Seeker

  • New Members
  • 8 posts

Posted 08 February 2004 - 07:59 PM

I could not get the HotKeySet() function to work with FFXI

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