Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CoordMode, Mouse, Screen
- stored_pos1 := ""
- stored_pos2 := ""
- toggle := 0
- !s::
- BlockInput := !BlockInput
- toggle := !toggle
- If toggle
- SetTImer, timer, 13000
- else
- SetTimer, timer, Off
- Return
- timer:
- DoSequence("f")
- Return
- +F2:: ; Shift + F2 to record position
- MouseGetPos, stored_pos3_x, stored_pos3_y
- Return
- !f:: ; Alt + f
- DoSequence("f")
- Return
- !e:: ; Alt + e
- DoSequence("e")
- Return
- ShiftF3: ; This will used in the DoSequence() function.
- +F3:: ; NOTE: This will not executed if you dont press manually.
- MouseGetPos, xpos, ypos
- stored_pos1 := xpos "," ypos
- return
- +F4::
- MouseGetPos, xpos, ypos
- stored_pos2 := xpos "," ypos
- return
- !a::
- BlockInput, MouseMove
- SetTimer, EnableClickMove, 1000
- toggle := !toggle
- if (toggle = 1) {
- Send, +{F3}
- Send, {F4}
- StringSplit, xy, stored_pos2, `,
- MouseMove, %xy1%, %xy2%, 0
- Send, {LButton}
- Send, {F3}
- } else {
- Send, +{F3}
- Send, {F4}
- StringSplit, xy, stored_pos2, `,
- MouseMove, %xy1%, %xy2%, 0
- Send, {LButton}
- Send, {F3}
- }
- BlockInput, MouseMoveOff
- MouseMove, % A_ScreenWidth/2, % A_ScreenHeight/2, 0
- return
- EnableClickMove:
- BlockInput, MouseMoveOff
- return
- #If (BlockInput)
- *LButton::
- *RButton::Return ; block mouse clicks
- #If
- DoSequence(key){
- Global stored_pos3_x, stored_pos3_y
- MouseGetPos, starting_pos_x, starting_pos_y
- Send, +{F3} ; NOTE: This will not trigger the hotkey above.
- ; GoSub, ShiftF3 ; This will trigger the hotkey above, if you really need it.
- Send, {F2}
- MouseMove, % stored_pos3_x, % stored_pos3_y, 0
- Send, {Click Left}
- Send, {%key%}
- MouseMove, % stored_pos3_x - 200, % stored_pos3_y, 0
- Send, {Click Left}
- Send, {%key%}
- MouseMove, % stored_pos3_x, % stored_pos3_y - 200, 0
- Send, {Click Left}
- Send, {%key%}
- MouseMove, % stored_pos3_x - 200, % stored_pos3_y - 200, 0
- Send, {Click Left}
- Send, {%key%}
- Send, {F3}
- MouseMove, % starting_pos_x, % starting_pos_y
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement