Тема: AHK: Как применить скрипт?
Я чайник, я ничего не понимаю в скриптинге. НО ОЧЕНЬ нужно применить ортогональное пермещение мыши (то есть строго по горизонтали или по вертикали). ПОМОГИТЕ ПОЖАЛУЙСТА УСТАНОВИТЬ СКРИПТ НИЖЕ, ОЧЕНЬ НУЖНО!!! Тому, кто поможет положу на мобильник 100 рублей
SetBatchLines, -1
SetMouseDelay, -1
CoordMode, Mouse
OnExit, Exit
hHook := DllCall("SetWindowsHookEx"
, Int, WH_MOUSE_LL := 14
, Int, RegisterCallback("LowLevelMouseProc", "Fast")
, UInt, DllCall("GetModuleHandle", UInt, 0)
, UInt, 0)
Return
Exit:
DllCall("UnhookWindowsHookEx", UInt, hHook)
ExitApp
~LCtrl::
MouseGetPos,, y_prev
Direction = horizontal
Return
~LShift::
MouseGetPos, x_prev
Direction = vertical
Return
~LCtrl Up:: Direction =
~LShift Up:: Direction =
LowLevelMouseProc(nCode, wParam, lParam)
{
global Direction, x_prev, y_prev
if (nCode < 0 || !Direction || wParam != 0x200) ; WM_MOUSEMOVE = 0x200
Return DllCall("CallNextHookEx", UInt, 0, Int, nCode, UInt, wParam, UInt, lParam)
if Direction = horizontal
x := NumGet(lParam+0), y := y_prev
if Direction = vertical
y := NumGet(lParam+0, 4), x := x_prev
MouseMove, x, y, 0
Return 1
}