Jump to content

PixelCheckSum, Help, i have working code.


Recommended Posts

Hey here is my working code

WinWait("WarRock","")
If Not WinActive("WarRock","") Then WinActivate("WarRock","")
WinWaitActive("WarRock","")

; Get initial checksum

$checksum = PixelChecksum(230, 92, 252, 130)

; Wait for the region to change, the region is checked every 100ms to reduce CPU load

While $checksum = PixelChecksum(230, 92, 252, 130)
  Sleep(100)
WEnd

How do i make it that If $checksum stops to preform an action (such as clicking)

Without putting it after WEnd?

Link to comment
Share on other sites

try this and see....not sure if it works....

HotKeySet("{F7}", "LeaveLoop")
HotKeySet("{F8}", "endall")
Global $ll, $kk = False
Global $work = True

WinWait("WarRock", "")
If Not WinActive("WarRock", "") Then WinActivate("WarRock", "")
WinWaitActive("WarRock", "")

$checksum = PixelChecksum(230, 92, 252, 130)

While $checksum = PixelChecksum(230, 92, 252, 130)
    If $work Then
        $work = False
        AdlibEnable("setgoing", $nMonitorSleep)
    EndIf
    If $kk Then ExitLoop
    Sleep(100)
WEnd

Func setgoing()
    $work = True
    AdlibDisable()
EndFunc  ;==>setgoing

Func LeaveLoop()
    $ll = True
EndFunc  ;==>LeaveLoop

Func endall()
    $ll = True
    $kk = True
EndFunc  ;==>endall

mouse not found....scroll any mouse to continue.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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