Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ^o::
- Sendmode Event
- DetectHiddenWindows, On
- CoordMode,Mouse,Screen
- CoordMode,Pixel,Screen
- StopLoop := False
- MouseGetPos, xposition,yposition,id
- WinGetTitle, title, ahk_id %id%
- SetTitleMatchMode, 2
- SetControlDelay -1
- ; resolution = 1485 x 995
- ; spam = 611 x 693
- ; reset = 1341 x 285
- loop
- {
- if StopLoop
- {
- break
- }
- WinGetPos,winX,winY,Width, Height,ahk_id %id%
- spamX := winX + 611*Width/1485
- spamY := winY + 693*Height/995
- resetX := winX + 1341*Width/1485
- resetY := winY + 285*Height/995
- spinX := winX + 986*Width/1485
- spinY := winY + 703*Height/995
- PixelGetColor, color, %resetX%, %resetY%, Slow
- sleep 10
- if (color = 0xB7846C){
- Click %resetX%,%resetY%
- ;ControlClick,x645 y100,ahk_id id,,,,pos
- sleep 500
- Click %spinX%,%spinY%
- sleep 500
- } else {
- ;ToolTip %color%
- Click %spamX%,%spamY%
- ;ControlClick,x300 y340,ahk_id id,,,,pos
- sleep 200
- }
- }
- return
- ^p::
- StopLoop := True
- i = 0
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement