Touchable

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

OverSetSScreenEdges() ; Initializes the screen dimensions

#SingleInstance force
#NoEnv
SetBatchLines -1
Process Priority, , R
BlockInput Mouse ; user mouse input is ignored during MouseMove
CoordMode Mouse, Screen ; absolute coordinates
SetMouseDelay -1 ; fastest action
swap_xy := false
invert_x := false
invert_y := false
return

InvertMouse:
MouseGetPos x1, y1 ; get initial mouse pointer location

x0 := (xdiff) ? ( (x0 < monitor_left) ? monitor_left : ( (x0 > monitor_right) ?


monitor_right : x0) ) : x0
y0 := (ydiff) ? ( (y0 < monitor_top) ? monitor_top : ( (y0 > monitor_bottom) ?
monitor_bottom : y0) ) : y0

MouseMove x0, y0, 0 ; move the cursor and retain new position
return

~^!Up::
SetTimer InvertMouse, Off
return

~^!Right::
Sleep 200 ; wait until screen is rotated
SetScreenEdges()
InitCursor()
swap_xy := true
invert_x := false
invert_y := true
SetTimer InvertMouse, 1
return

~^!Down::
Sleep 200 ; wait until screen is rotated
SetScreenEdges()
InitCursor()
swap_xy := false
invert_x := true
invert_y := true
SetTimer InvertMouse, 1
return

~^!Left::
Sleep 200 ; wait until screen is rotated
SetScreenEdges()
InitCursor()
swap_xy := true
invert_x := true
invert_y := false
SetTimer InvertMouse, 1
return

You might also like