A_TickCount
Posted: 24 May 2022, 12:09
Yes im bad at this, wondering how to use A_TickCount in this script, If the pixel is found earlier than lets say 870000, do an action, thats it.
Code: Select all
CoordMode, Pixel, Relative
sleep, 10000
Loop
{
PixelSearch, x, y, 759, 610, 763, 615, 0xE5464F
if (ErrorLevel = 0)
{
Random, rand, 110000, 113000
Sleep, %rand%
Click, Down, 1093 493
Click, Up, 1135 493
sleep, 300
send ^c
sleep, 400
Click, 767, 558
sleep, 400
Send ^v
Sleep 1000
Click, 767, 558
sleep, 300,
Click, 851, 619
sleep, 500
}
if (ErrorLevel = 0) "in earlier than 870000"
{
fullScriptPath = C:\Users\Vetx\Desktop\CODE.ahk
DetectHiddenWindows, On
WinClose, %fullScriptPath% ahk_class AutoHotkey
sleep, 500
}