Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. #SingleInstance force
  2. #Include OCR.ahk
  3.  
  4. ;widthToScan=190
  5. ;heightToScan=250
  6.  
  7. widthToScan=125
  8. heightToScan=120
  9.  
  10. toggle = 0
  11.  
  12. F3:: ExitApp ;Programos sustabdymo mygtukas
  13.  
  14. F5::
  15. Toggle := !Toggle
  16. While Toggle {
  17. ; MouseGetPos, mouseX, mouseY
  18. ; topLeftX := mouseX
  19. ; topLeftY := mouseY - heightToScan
  20.  
  21. ; WinMove, OcrPreviewWindow, , % topLeftX+2, % topLeftY-2
  22.  
  23. ;NOTE: this is where the magical OCR function is called
  24. ; magicalText := GetOCR(topLeftX, topLeftY, widthToScan, heightToScan, options)
  25.  
  26. magicalText := GetOCR(795, 600, widthToScan, heightToScan, options)
  27.  
  28. raide := RegExReplace(magicalText, "\W")
  29. if raide = Q
  30. Send, {q}
  31. if raide = W
  32. Send, {w}
  33. if raide = E
  34. Send, {e}
  35. if raide = A
  36. Send, {a}
  37. if raide = n ;Raide A atpazystama kaip N
  38. Send, {a}
  39. if raide = S
  40. Send, {s}
  41. if raide = 5 ;Raide A atpazystama kaip 5
  42. Send, {s}
  43. if raide = D
  44. Send, {d}
  45. if raide = Z
  46. Send, {z}
  47. if raide = X
  48. Send, {x}
  49. if raide = C
  50. Send, {c}
  51.  
  52. ToolTip, ARK fish bot v1.0`nF3 - sustabdyti`n%raide%`nMouse coords:`n%topLeftX%x%topLeftY%
  53.  
  54. ; ToolTip, Mouse coords:`n%topLeftX%x%topLeftY%
  55.  
  56. Sleep, 500 ;Programos kartojimo daznis (1000=1sec)
  57. }
  58. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement