Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; THIS ONE IS WORSE ACTUALLY, IT MAKES THE EXTRA SNIPPING TOOL FEATURES USELESS (SUCH AS WINDOW SNIP)
- #Requires AutoHotkey 2.0
- CoordMode("Mouse", "Screen")
- snipCursor := {StartX: unset, StartY: unset} ; Ad hoc object, usable w/ dot notation (no need for class)
- #HotIf WinActive("ahk_exe ScreenClippingHost.exe")
- ; can use WIN+SHIFT+S to take snips for now w/o the help of AHK
- ~*LButton::
- {
- MouseGetPos(&startCursorX, &startCursorY)
- snipCursor.StartX := startCursorX
- snipCursor.StartY := startCursorY
- }
- ~*LButton Up:: ;msgbox A_TimeSincePriorHotkey
- {
- MouseGetPos(&endCursorX, &endCursorY)
- desktop := " / " A_ScreenWidth " x " A_ScreenHeight
- if (Abs(snipCursor.StartX - endCursorX) > 10 && Abs(snipCursor.StartY - endCursorY) > 10)
- MsgBox(Abs(snipCursor.StartX - endCursorX) " x " Abs(snipCursor.StartY - endCursorY) desktop)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement