Jump to content

Recommended Posts

Posted (edited)

Hey there,

How could I modify my code to add simple Enter after 30 minutes of looping through the actual script? 

 

$left = 703
$top = 264
$right = 1170
$bottom = 709

Local $colors[4] = [ 0xE83636, 0x98A508, 0x282828, 0xFEFEFE ]

Sleep(2000)
HotKeySet("{ESC}","qt")
While 1
    For $i = 0 To 3
        $c=PixelSearch($left, $top, $right, $bottom, $colors[$i])
        If IsArray($c) Then
            MouseMove($c[0],$c[1],0)
            Sleep(1000)
            MouseClick("left")
            Sleep (4000)

        EndIf
    Next
WEnd

Func qt()
    Exit
EndFunc

 

Also, Iv been using an easy Hotkey to start or cancel the script such as 1 to start then 2 to terminate but i cannot figure out how to implement the same in my previous script :(  here is what I normally use with other scripts:

Global $UnPaused
HotKeySet("{1}", "TogglePause")
HotKeySet("{2}", "Terminate")

While 1
    Sleep(100)
    ToolTip("Script is Paused",0,0)
WEnd

Func TogglePause()
    $UnPaused = NOT $UnPaused
    While $UnPaused
    
Sleep(1000)
MouseClick("left")
Sleep(1000)

    WEnd
EndFunc

Func Terminate()
    Exit 0
EndFunc

 

Thanks for your support

Edited by jaxclain
  • Jos locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...