키보드의 넘패드를 마우스처럼 사용하는 법 -- by deguix
이 스크립트는 키보드를 마우스처럼 사용할 수 있도록 해 줍니다. 거의 실제 마우스를 사용하는 것과 비슷하게 쉽습니다 (어떤 작업에는 훨씬 더 쉬울 수 있습니다). 최대 다섯 개의 마우스 버튼을 지원하며 마우스 휠을 회전할 수 있습니다. 또한 이동 속도, 가속 기능, 그리고 "축 뒤집기"를 재단할 수 있습니다.
이 스크립틀 내려 받기 | 다른 샘플 스크립트 | 홈으로
/* o------------------------------------------------------------o |키보드의 넘패드를 마우스로 사용하기 | (------------------------------------------------------------) | By deguix / 오토핫키 1.0.22+ 용 스크립트 파일 | | ----------------------------------------| | | | 이 스크립트는 오토핫키의 사용법을 보여주는 예제입니다. | | 키보드의 넘패드 키를 리맵해서 마우스로서 변신시킵니다. | | 가속 기능이 들어 있어서 키를 오랫 누르고 있으면 마우스 | | 이동을 가속할 수 있습니다다. 회전 기능도 갖추고 있어서 | | 넘패드 마우스를 "돌릴 수 있습니다" | | 즉, NumPadDown와 NumPadUp를 누르면 휠처럼 돌릴 수 있습니다.| | 아래에 사용된 키 리스트를 참조하십시오: | | | |------------------------------------------------------------| | 키 | 설명 | |------------------------------------------------------------| | ScrollLock (toggle on)| 넘패드 마우스 모드를 활성화 | |-----------------------|------------------------------------| | NumPad0 | 왼버튼 클릭. | | NumPad5 | 가운데 버튼 클릭. | | NumPadDot | 우버튼 클릭. | | NumPadDiv/NumPadMult | X1/X2 마우스 버튼 클릭. (Win 2k+) | | NumPadSub/NumPadAdd | 마우스 휠을 위 아래로 이동. | | | | |-----------------------|------------------------------------| | NumLock (toggled off) | 마우스 이동 모드를 활성화. | |-----------------------|------------------------------------| | NumPadEnd/Down/PgDn/ | 마우스 이동. | | /Left/Right/Home/Up/ | | | /PgUp | | | | | |-----------------------|------------------------------------| | NumLock (toggled on) | 마우스 속도 조절 모드 활성화. | |-----------------------|------------------------------------| | NumPad7/NumPad1 | 버튼을 누를 때마다 | | | 가속이 증가/감소. | | NumPad8/NumPad2 | 버튼을 누를 때마다 | | | 최초 속도가 증가/감소. | | NumPad9/NumPad3 | 버튼을 누를 때마다 | | | 최대 속도가 증가/감소. | | ^NumPad7/^NumPad1 | 버튼을 누를 때마다 * | | | 휠 가속이 증가/감소. | | ^NumPad8/^NumPad2 | 버튼을 누를 때마다 * | | | 휠 초기 속도 증가/감소. | | ^NumPad9/^NumPad3 | 버튼을 누를 때마다 * | | | 휠 최대 속도 증가/감소. | | NumPad4/NumPad6 | 오른쪽으로 회전 각도를 증가/감소 | | | 즉, 180° = 반대로 뒤집어짐 | |------------------------------------------------------------| | * = 이 옵션은 제어판에서 조절한 마우스 휠의 속도의 | | 영향을 받습니다. 마우스에 휠이 없다면 | | 기본값은 버튼 눌림당 3 +/- 줄입니다. | o------------------------------------------------------------o */ ;환경 구성 시작 #SingleInstance force #MaxHotkeysPerInterval 500 ; 키보드 갈고리를 사용하여 넘패드 핫키를 구현하면 ; à와 같은 ANSI 문자의 생성을 간섭하지 않습니다. ; 이 때문에 오토 핫키는 ALT를 누르고 일련의 ; 넘패드 키눌림을 전송함으로써 그런 문자들을 생성합니다. ; 갈고리 핫키는 똑똑해서 그런 키눌림은 무시합니다. #UseHook MouseSpeed = 1 MouseAccelerationSpeed = 1 MouseMaxSpeed = 5 ; 마우스 휠의 속도는 제어판에서 설정합니다. ; 보통의 마우스 행위에 영향을 미치기 때문에, 아래의 세 가지 설정의 ; 실제 속도는 정상 마우스 휠 속도의 두 배가 됩니다. MouseWheelSpeed = 1 MouseWheelAccelerationSpeed = 1 MouseWheelMaxSpeed = 5 MouseRotationAngle = 0 ;환경 구성 끝 ; 다음은 꼭 필요합니다. 그렇지 않으면 키눌림은 ; 정상적인 조치를 전송하지 못하기 때문입니다. ; NumPadDiv와 같은 경우 가끔 "/"을 화면에 전송합니다 #InstallKeybdHook Temp = 0 Temp2 = 0 MouseRotationAnglePart = %MouseRotationAngle% ; 45º로 나눕니다; 왜냐하면 MouseMove는 정수만 지원하기 때문입니다, ; 그리고 마우스 회전을 45º보다 작은 숫자로 변경하면; ; 이상한 행위를 야기할 수 있습니다. ; ; 예를 들어: 22.5º로 지정하면 NumPadUp를 누를때: ; 먼저 변을 향하여 속도가 1에 도달할 때까지 ; 위로 이동합니다. MouseRotationAnglePart /= 45 MouseCurrentAccelerationSpeed = 0 MouseCurrentSpeed = %MouseSpeed% MouseWheelCurrentAccelerationSpeed = 0 MouseWheelCurrentSpeed = %MouseSpeed% SetKeyDelay, -1 SetMouseDelay, -1 Hotkey, *NumPad0, ButtonLeftClick Hotkey, *NumpadIns, ButtonLeftClickIns Hotkey, *NumPad5, ButtonMiddleClick Hotkey, *NumpadClear, ButtonMiddleClickClear Hotkey, *NumPadDot, ButtonRightClick Hotkey, *NumPadDel, ButtonRightClickDel Hotkey, *NumPadDiv, ButtonX1Click Hotkey, *NumPadMult, ButtonX2Click Hotkey, *NumpadSub, ButtonWheelUp Hotkey, *NumpadAdd, ButtonWheelDown Hotkey, *NumPadUp, ButtonUp Hotkey, *NumPadDown, ButtonDown Hotkey, *NumPadLeft, ButtonLeft Hotkey, *NumPadRight, ButtonRight Hotkey, *NumPadHome, ButtonUpLeft Hotkey, *NumPadEnd, ButtonUpRight Hotkey, *NumPadPgUp, ButtonDownLeft Hotkey, *NumPadPgDn, ButtonDownRight Hotkey, Numpad8, ButtonSpeedUp Hotkey, Numpad2, ButtonSpeedDown Hotkey, Numpad7, ButtonAccelerationSpeedUp Hotkey, Numpad1, ButtonAccelerationSpeedDown Hotkey, Numpad9, ButtonMaxSpeedUp Hotkey, Numpad3, ButtonMaxSpeedDown Hotkey, Numpad6, ButtonRotationAngleUp Hotkey, Numpad4, ButtonRotationAngleDown Hotkey, !Numpad8, ButtonWheelSpeedUp Hotkey, !Numpad2, ButtonWheelSpeedDown Hotkey, !Numpad7, ButtonWheelAccelerationSpeedUp Hotkey, !Numpad1, ButtonWheelAccelerationSpeedDown Hotkey, !Numpad9, ButtonWheelMaxSpeedUp Hotkey, !Numpad3, ButtonWheelMaxSpeedDown Gosub, ~ScrollLock ; 현재 스크롤락의 상태에 기반하여 초기화합니다. return ; 키 활성화 지원 ~ScrollLock:: ; 키를 떼기를 기다립니다. 그렇지 않으면 갈고리 상태가 ; 키를 누르고 있는 동안 리셋되어 버려서, 업-이벤트가 억눌러집니다, ; 이어서 스크롤락 상태/불빛의 토클을 막아 버립니다: KeyWait, ScrollLock GetKeyState, ScrollLockState, ScrollLock, T If ScrollLockState = D { Hotkey, *NumPad0, on Hotkey, *NumpadIns, on Hotkey, *NumPad5, on Hotkey, *NumPadDot, on Hotkey, *NumPadDel, on Hotkey, *NumPadDiv, on Hotkey, *NumPadMult, on Hotkey, *NumpadSub, on Hotkey, *NumpadAdd, on Hotkey, *NumPadUp, on Hotkey, *NumPadDown, on Hotkey, *NumPadLeft, on Hotkey, *NumPadRight, on Hotkey, *NumPadHome, on Hotkey, *NumPadEnd, on Hotkey, *NumPadPgUp, on Hotkey, *NumPadPgDn, on Hotkey, Numpad8, on Hotkey, Numpad2, on Hotkey, Numpad7, on Hotkey, Numpad1, on Hotkey, Numpad9, on Hotkey, Numpad3, on Hotkey, Numpad6, on Hotkey, Numpad4, on Hotkey, !Numpad8, on Hotkey, !Numpad2, on Hotkey, !Numpad7, on Hotkey, !Numpad1, on Hotkey, !Numpad9, on Hotkey, !Numpad3, on } else { Hotkey, *NumPad0, off Hotkey, *NumpadIns, off Hotkey, *NumPad5, off Hotkey, *NumPadDot, off Hotkey, *NumPadDel, off Hotkey, *NumPadDiv, off Hotkey, *NumPadMult, off Hotkey, *NumpadSub, off Hotkey, *NumpadAdd, off Hotkey, *NumPadUp, off Hotkey, *NumPadDown, off Hotkey, *NumPadLeft, off Hotkey, *NumPadRight, off Hotkey, *NumPadHome, off Hotkey, *NumPadEnd, off Hotkey, *NumPadPgUp, off Hotkey, *NumPadPgDn, off Hotkey, Numpad8, off Hotkey, Numpad2, off Hotkey, Numpad7, off Hotkey, Numpad1, off Hotkey, Numpad9, off Hotkey, Numpad3, off Hotkey, Numpad6, off Hotkey, Numpad4, off Hotkey, !Numpad8, off Hotkey, !Numpad2, off Hotkey, !Numpad7, off Hotkey, !Numpad1, off Hotkey, !Numpad9, off Hotkey, !Numpad3, off } return ; 마우스 클릭 지원 ButtonLeftClick: GetKeyState, already_down_state, LButton If already_down_state = D return Button2 = NumPad0 ButtonClick = Left Goto ButtonClickStart ButtonLeftClickIns: GetKeyState, already_down_state, LButton If already_down_state = D return Button2 = NumPadIns ButtonClick = Left Goto ButtonClickStart ButtonMiddleClick: GetKeyState, already_down_state, MButton If already_down_state = D return Button2 = NumPad5 ButtonClick = Middle Goto ButtonClickStart ButtonMiddleClickClear: GetKeyState, already_down_state, MButton If already_down_state = D return Button2 = NumPadClear ButtonClick = Middle Goto ButtonClickStart ButtonRightClick: GetKeyState, already_down_state, RButton If already_down_state = D return Button2 = NumPadDot ButtonClick = Right Goto ButtonClickStart ButtonRightClickDel: GetKeyState, already_down_state, RButton If already_down_state = D return Button2 = NumPadDel ButtonClick = Right Goto ButtonClickStart ButtonX1Click: GetKeyState, already_down_state, XButton1 If already_down_state = D return Button2 = NumPadDiv ButtonClick = X1 Goto ButtonClickStart ButtonX2Click: GetKeyState, already_down_state, XButton2 If already_down_state = D return Button2 = NumPadMult ButtonClick = X2 Goto ButtonClickStart ButtonClickStart: MouseClick, %ButtonClick%,,, 1, 0, D SetTimer, ButtonClickEnd, 10 return ButtonClickEnd: GetKeyState, kclickstate, %Button2%, P if kclickstate = D return SetTimer, ButtonClickEnd, off MouseClick, %ButtonClick%,,, 1, 0, U return ; 마우스 이동 지원 ButtonSpeedUp: MouseSpeed++ ToolTip, Mouse speed: %MouseSpeed% pixels SetTimer, RemoveToolTip, 1000 return ButtonSpeedDown: If MouseSpeed > 1 MouseSpeed-- If MouseSpeed = 1 ToolTip, Mouse speed: %MouseSpeed% pixel else ToolTip, Mouse speed: %MouseSpeed% pixels SetTimer, RemoveToolTip, 1000 return ButtonAccelerationSpeedUp: MouseAccelerationSpeed++ ToolTip, Mouse acceleration speed: %MouseAccelerationSpeed% pixels SetTimer, RemoveToolTip, 1000 return ButtonAccelerationSpeedDown: If MouseAccelerationSpeed > 1 MouseAccelerationSpeed-- If MouseAccelerationSpeed = 1 ToolTip, Mouse acceleration speed: %MouseAccelerationSpeed% pixel else ToolTip, Mouse acceleration speed: %MouseAccelerationSpeed% pixels SetTimer, RemoveToolTip, 1000 return ButtonMaxSpeedUp: MouseMaxSpeed++ ToolTip, Mouse maximum speed: %MouseMaxSpeed% pixels SetTimer, RemoveToolTip, 1000 return ButtonMaxSpeedDown: If MouseMaxSpeed > 1 MouseMaxSpeed-- If MouseMaxSpeed = 1 ToolTip, Mouse maximum speed: %MouseMaxSpeed% pixel else ToolTip, Mouse maximum speed: %MouseMaxSpeed% pixels SetTimer, RemoveToolTip, 1000 return ButtonRotationAngleUp: MouseRotationAnglePart++ If MouseRotationAnglePart >= 8 MouseRotationAnglePart = 0 MouseRotationAngle = %MouseRotationAnglePart% MouseRotationAngle *= 45 ToolTip, Mouse rotation angle: %MouseRotationAngle%° SetTimer, RemoveToolTip, 1000 return ButtonRotationAngleDown: MouseRotationAnglePart-- If MouseRotationAnglePart < 0 MouseRotationAnglePart = 7 MouseRotationAngle = %MouseRotationAnglePart% MouseRotationAngle *= 45 ToolTip, Mouse rotation angle: %MouseRotationAngle%° SetTimer, RemoveToolTip, 1000 return ButtonUp: ButtonDown: ButtonLeft: ButtonRight: ButtonUpLeft: ButtonUpRight: ButtonDownLeft: ButtonDownRight: If Button <> 0 { IfNotInString, A_ThisHotkey, %Button% { MouseCurrentAccelerationSpeed = 0 MouseCurrentSpeed = %MouseSpeed% } } StringReplace, Button, A_ThisHotkey, * ButtonAccelerationStart: If MouseAccelerationSpeed >= 1 { If MouseMaxSpeed > %MouseCurrentSpeed% { Temp = 0.001 Temp *= %MouseAccelerationSpeed% MouseCurrentAccelerationSpeed += %Temp% MouseCurrentSpeed += %MouseCurrentAccelerationSpeed% } } ;MouseRotationAngle을 버튼 방향의 속도로 변환 { MouseCurrentSpeedToDirection = %MouseRotationAngle% MouseCurrentSpeedToDirection /= 90.0 Temp = %MouseCurrentSpeedToDirection% if Temp >= 0 { if Temp < 1 { MouseCurrentSpeedToDirection = 1 MouseCurrentSpeedToDirection -= %Temp% Goto EndMouseCurrentSpeedToDirectionCalculation } } if Temp >= 1 { if Temp < 2 { MouseCurrentSpeedToDirection = 0 Temp -= 1 MouseCurrentSpeedToDirection -= %Temp% Goto EndMouseCurrentSpeedToDirectionCalculation } } if Temp >= 2 { if Temp < 3 { MouseCurrentSpeedToDirection = -1 Temp -= 2 MouseCurrentSpeedToDirection += %Temp% Goto EndMouseCurrentSpeedToDirectionCalculation } } if Temp >= 3 { if Temp < 4 { MouseCurrentSpeedToDirection = 0 Temp -= 3 MouseCurrentSpeedToDirection += %Temp% Goto EndMouseCurrentSpeedToDirectionCalculation } } } EndMouseCurrentSpeedToDirectionCalculation: ;MouseRotationAngle를 90도의 속도로 오른쪽으로 변환 { MouseCurrentSpeedToSide = %MouseRotationAngle% MouseCurrentSpeedToSide /= 90.0 Temp = %MouseCurrentSpeedToSide% Transform, Temp, mod, %Temp%, 4 if Temp >= 0 { if Temp < 1 { MouseCurrentSpeedToSide = 0 MouseCurrentSpeedToSide += %Temp% Goto EndMouseCurrentSpeedToSideCalculation } } if Temp >= 1 { if Temp < 2 { MouseCurrentSpeedToSide = 1 Temp -= 1 MouseCurrentSpeedToSide -= %Temp% Goto EndMouseCurrentSpeedToSideCalculation } } if Temp >= 2 { if Temp < 3 { MouseCurrentSpeedToSide = 0 Temp -= 2 MouseCurrentSpeedToSide -= %Temp% Goto EndMouseCurrentSpeedToSideCalculation } } if Temp >= 3 { if Temp < 4 { MouseCurrentSpeedToSide = -1 Temp -= 3 MouseCurrentSpeedToSide += %Temp% Goto EndMouseCurrentSpeedToSideCalculation } } } EndMouseCurrentSpeedToSideCalculation: MouseCurrentSpeedToDirection *= %MouseCurrentSpeed% MouseCurrentSpeedToSide *= %MouseCurrentSpeed% Temp = %MouseRotationAnglePart% Transform, Temp, Mod, %Temp%, 2 If Button = NumPadUp { if Temp = 1 { MouseCurrentSpeedToSide *= 2 MouseCurrentSpeedToDirection *= 2 } MouseCurrentSpeedToDirection *= -1 MouseMove, %MouseCurrentSpeedToSide%, %MouseCurrentSpeedToDirection%, 0, R } else if Button = NumPadDown { if Temp = 1 { MouseCurrentSpeedToSide *= 2 MouseCurrentSpeedToDirection *= 2 } MouseCurrentSpeedToSide *= -1 MouseMove, %MouseCurrentSpeedToSide%, %MouseCurrentSpeedToDirection%, 0, R } else if Button = NumPadLeft { if Temp = 1 { MouseCurrentSpeedToSide *= 2 MouseCurrentSpeedToDirection *= 2 } MouseCurrentSpeedToSide *= -1 MouseCurrentSpeedToDirection *= -1 MouseMove, %MouseCurrentSpeedToDirection%, %MouseCurrentSpeedToSide%, 0, R } else if Button = NumPadRight { if Temp = 1 { MouseCurrentSpeedToSide *= 2 MouseCurrentSpeedToDirection *= 2 } MouseMove, %MouseCurrentSpeedToDirection%, %MouseCurrentSpeedToSide%, 0, R } else if Button = NumPadHome { Temp = %MouseCurrentSpeedToDirection% Temp -= %MouseCurrentSpeedToSide% Temp *= -1 Temp2 = %MouseCurrentSpeedToDirection% Temp2 += %MouseCurrentSpeedToSide% Temp2 *= -1 MouseMove, %Temp%, %Temp2%, 0, R } else if Button = NumPadPgUp { Temp = %MouseCurrentSpeedToDirection% Temp += %MouseCurrentSpeedToSide% Temp2 = %MouseCurrentSpeedToDirection% Temp2 -= %MouseCurrentSpeedToSide% Temp2 *= -1 MouseMove, %Temp%, %Temp2%, 0, R } else if Button = NumPadEnd { Temp = %MouseCurrentSpeedToDirection% Temp += %MouseCurrentSpeedToSide% Temp *= -1 Temp2 = %MouseCurrentSpeedToDirection% Temp2 -= %MouseCurrentSpeedToSide% MouseMove, %Temp%, %Temp2%, 0, R } else if Button = NumPadPgDn { Temp = %MouseCurrentSpeedToDirection% Temp -= %MouseCurrentSpeedToSide% Temp2 *= -1 Temp2 = %MouseCurrentSpeedToDirection% Temp2 += %MouseCurrentSpeedToSide% MouseMove, %Temp%, %Temp2%, 0, R } SetTimer, ButtonAccelerationEnd, 10 return ButtonAccelerationEnd: GetKeyState, kstate, %Button%, P if kstate = D Goto ButtonAccelerationStart SetTimer, ButtonAccelerationEnd, off MouseCurrentAccelerationSpeed = 0 MouseCurrentSpeed = %MouseSpeed% Button = 0 return ; 마우스 휠 이동 지원 ButtonWheelSpeedUp: MouseWheelSpeed++ RegRead, MouseWheelSpeedMultiplier, HKCU, Control Panel\Desktop, WheelScrollLines If MouseWheelSpeedMultiplier <= 0 MouseWheelSpeedMultiplier = 1 MouseWheelSpeedReal = %MouseWheelSpeed% MouseWheelSpeedReal *= %MouseWheelSpeedMultiplier% ToolTip, Mouse wheel speed: %MouseWheelSpeedReal% lines SetTimer, RemoveToolTip, 1000 return ButtonWheelSpeedDown: RegRead, MouseWheelSpeedMultiplier, HKCU, Control Panel\Desktop, WheelScrollLines If MouseWheelSpeedMultiplier <= 0 MouseWheelSpeedMultiplier = 1 If MouseWheelSpeedReal > %MouseWheelSpeedMultiplier% { MouseWheelSpeed-- MouseWheelSpeedReal = %MouseWheelSpeed% MouseWheelSpeedReal *= %MouseWheelSpeedMultiplier% } If MouseWheelSpeedReal = 1 ToolTip, Mouse wheel speed: %MouseWheelSpeedReal% line else ToolTip, Mouse wheel speed: %MouseWheelSpeedReal% lines SetTimer, RemoveToolTip, 1000 return ButtonWheelAccelerationSpeedUp: MouseWheelAccelerationSpeed++ RegRead, MouseWheelSpeedMultiplier, HKCU, Control Panel\Desktop, WheelScrollLines If MouseWheelSpeedMultiplier <= 0 MouseWheelSpeedMultiplier = 1 MouseWheelAccelerationSpeedReal = %MouseWheelAccelerationSpeed% MouseWheelAccelerationSpeedReal *= %MouseWheelSpeedMultiplier% ToolTip, Mouse wheel acceleration speed: %MouseWheelAccelerationSpeedReal% lines SetTimer, RemoveToolTip, 1000 return ButtonWheelAccelerationSpeedDown: RegRead, MouseWheelSpeedMultiplier, HKCU, Control Panel\Desktop, WheelScrollLines If MouseWheelSpeedMultiplier <= 0 MouseWheelSpeedMultiplier = 1 If MouseWheelAccelerationSpeed > 1 { MouseWheelAccelerationSpeed-- MouseWheelAccelerationSpeedReal = %MouseWheelAccelerationSpeed% MouseWheelAccelerationSpeedReal *= %MouseWheelSpeedMultiplier% } If MouseWheelAccelerationSpeedReal = 1 ToolTip, Mouse wheel acceleration speed: %MouseWheelAccelerationSpeedReal% line else ToolTip, Mouse wheel acceleration speed: %MouseWheelAccelerationSpeedReal% lines SetTimer, RemoveToolTip, 1000 return ButtonWheelMaxSpeedUp: MouseWheelMaxSpeed++ RegRead, MouseWheelSpeedMultiplier, HKCU, Control Panel\Desktop, WheelScrollLines If MouseWheelSpeedMultiplier <= 0 MouseWheelSpeedMultiplier = 1 MouseWheelMaxSpeedReal = %MouseWheelMaxSpeed% MouseWheelMaxSpeedReal *= %MouseWheelSpeedMultiplier% ToolTip, Mouse wheel maximum speed: %MouseWheelMaxSpeedReal% lines SetTimer, RemoveToolTip, 1000 return ButtonWheelMaxSpeedDown: RegRead, MouseWheelSpeedMultiplier, HKCU, Control Panel\Desktop, WheelScrollLines If MouseWheelSpeedMultiplier <= 0 MouseWheelSpeedMultiplier = 1 If MouseWheelMaxSpeed > 1 { MouseWheelMaxSpeed-- MouseWheelMaxSpeedReal = %MouseWheelMaxSpeed% MouseWheelMaxSpeedReal *= %MouseWheelSpeedMultiplier% } If MouseWheelMaxSpeedReal = 1 ToolTip, Mouse wheel maximum speed: %MouseWheelMaxSpeedReal% line else ToolTip, Mouse wheel maximum speed: %MouseWheelMaxSpeedReal% lines SetTimer, RemoveToolTip, 1000 return ButtonWheelUp: ButtonWheelDown: If Button <> 0 { If Button <> %A_ThisHotkey% { MouseWheelCurrentAccelerationSpeed = 0 MouseWheelCurrentSpeed = %MouseWheelSpeed% } } StringReplace, Button, A_ThisHotkey, * ButtonWheelAccelerationStart: If MouseWheelAccelerationSpeed >= 1 { If MouseWheelMaxSpeed > %MouseWheelCurrentSpeed% { Temp = 0.001 Temp *= %MouseWheelAccelerationSpeed% MouseWheelCurrentAccelerationSpeed += %Temp% MouseWheelCurrentSpeed += %MouseWheelCurrentAccelerationSpeed% } } If Button = NumPadSub MouseClick, wheelup,,, %MouseWheelCurrentSpeed%, 0, D else if Button = NumPadAdd MouseClick, wheeldown,,, %MouseWheelCurrentSpeed%, 0, D SetTimer, ButtonWheelAccelerationEnd, 100 return ButtonWheelAccelerationEnd: GetKeyState, kstate, %Button%, P if kstate = D Goto ButtonWheelAccelerationStart MouseWheelCurrentAccelerationSpeed = 0 MouseWheelCurrentSpeed = %MouseWheelSpeed% Button = 0 return RemoveToolTip: SetTimer, RemoveToolTip, Off ToolTip return