Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #SingleInstance force
- #Include OCR.ahk
- ;widthToScan=190
- ;heightToScan=250
- widthToScan=125
- heightToScan=120
- toggle = 0
- F3:: ExitApp ;Programos sustabdymo mygtukas
- F5::
- Toggle := !Toggle
- While Toggle {
- ; MouseGetPos, mouseX, mouseY
- ; topLeftX := mouseX
- ; topLeftY := mouseY - heightToScan
- ; WinMove, OcrPreviewWindow, , % topLeftX+2, % topLeftY-2
- ;NOTE: this is where the magical OCR function is called
- ; magicalText := GetOCR(topLeftX, topLeftY, widthToScan, heightToScan, options)
- magicalText := GetOCR(795, 600, widthToScan, heightToScan, options)
- raide := RegExReplace(magicalText, "\W")
- if raide = Q
- Send, {q}
- if raide = W
- Send, {w}
- if raide = E
- Send, {e}
- if raide = A
- Send, {a}
- if raide = n ;Raide A atpazystama kaip N
- Send, {a}
- if raide = S
- Send, {s}
- if raide = 5 ;Raide A atpazystama kaip 5
- Send, {s}
- if raide = D
- Send, {d}
- if raide = Z
- Send, {z}
- if raide = X
- Send, {x}
- if raide = C
- Send, {c}
- ToolTip, ARK fish bot v1.0`nF3 - sustabdyti`n%raide%`nMouse coords:`n%topLeftX%x%topLeftY%
- ; ToolTip, Mouse coords:`n%topLeftX%x%topLeftY%
- Sleep, 500 ;Programos kartojimo daznis (1000=1sec)
- }
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement