Помогите зациклить данный ахк скрипт
как зациклить данный ахк
#SingleInstance, force
#NoEnv
SetCapsLockState, Off
SetBatchLines, -1
SetMouseDelay, -1
CoordMode, Pixel, Window
CoordMode, Mouse, Window
Files:
IfNotExist, %A_ScriptDir%\images
{
msgbox,, file missing, extract the "images" file,3
ExitApp
}
MsgBox, 0,Tutorial, F1 to activate macro & F2 to Stop., 5
MsgBox, 0,Remember, Put the Fishing Rod on the tool number "2" and "Fist" on "1"., 5
MsgBox, 0,Remember, Also remove all your tools from the toolbar leaving only Fist (1) and Fishing Rod (2)., 5
MsgBox, 0,Remember, Subscribe to xGonca!, 5
F2::ExitApp
F1::
macro_on := !macro_on
if (macro_on)
fishing = false
Loop, 3
{
ToolTip
if WinExist("Ahk_exe RobloxPlayerBeta.exe")
{
WinActivate
WinGetPos,,,W,H,A
If ((W >= A_ScreenWidth ) & (H >= A_ScreenHeight))
{
Send {F11}
Sleep 100
}
WinMove, Ahk_exe RobloxPlayerBeta.exe,,,, 800, 599
}
}
Equipfishing:
{
SendInput, 1
Sleep, 300
SendInput, 2
Sleep, 300
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 60
SendInput, i
Sleep, 150
SendInput, o
Sleep, 150
MouseMove, 407, 251, 10
Sleep, 300
Click
Sleep, 350
SendInput, o
Sleep, 60
SendInput, o
Sleep, 60
SendInput, o
Sleep, 60
SendInput, o
Sleep, 60
fishing = true
Goto, Waiting
}
Return
Waiting:
{
Loop,
{
ImageSearch, x, y, 354, 503, 454, 603, *30 %A_ScriptDir%\images\white.png
If ErrorLevel = 0
{
Sleep, 200
MouseMove, 409, 531, 10
Sleep, 200
Goto, Fishing
}
}
}
Return
Fishing:
Sleep, 500
{
Loop,
{
ImageSearch, x, y, 337, 456, 477, 483, *30 %A_ScriptDir%\images\yellow.png
If ErrorLevel = 0
{
Click
Sleep, 50
}
ImageSearch, x, y, 337, 456, 477, 483, *30 %A_ScriptDir%\images\yellow_.png
If ErrorLevel = 0
{
Click
Sleep, 50
}
ImageSearch, x, y, 330, 207, 497, 290, *30 %A_ScriptDir%\images\fish.png
If ErrorLevel = 0
{
Sleep, 500
SendInput, e
Sleep, 300
SendInput, e
Sleep, 150
Goto, Equipfishing
}
}
Goto, Equipfishing
}
Return
Там то и дело одни циклы, что там зацикливать та, ничего не понятно.