Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #MaxThreadsPerHotKey, 2
- Toggle := 0
- ;KeyWait, Capslock, D
- ;MouseGetPos, eX, eY
- ;PixelGetColor, color, eX, eY
- ;MsgBox You pressed %color%
- F1::
- Toggle := !Toggle
- MouseMove, 500, 500
- Send {Click down}
- Sleep, 500
- Send {Click up}
- While Toggle {
- PixelSearch, aX, aY, 634, 848, 1302, 915, 0xFFFFFFFF, 0, fast
- PixelSearch, bX, bY, 634, 848, 1302, 915, 0x6969FF, 0, fast
- If(aX and aY and bX and bY) {
- MouseMove, aX, aY
- if(bX < aX) {
- Send {Click down}
- } Else {
- Send {Click up}
- }
- } Else If(aX and aY and !bX and !bY) {
- MouseMove, aX, aY
- Send {Click down}
- Sleep, 500
- Send {Click up}
- Sleep, 2000
- } Else {
- MouseMove, 0, 0
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement