Hello, I have this script
viewtopic.php?t=65335 that I found on this very awesome forum, it basically detects mouse movement and translates it to a keypress, so for my case I want it to be active/working only when I'm pressing a given key (let's say 'F6' as an example) which would be acting as a toggle (On) while pressing and (Off) while releasing, as you can see the script in question (the one i found) only works with right and left detection, it would be more beneficial if it can also work Up and Down, now this script is supposed to hold press a specific key when moving in a direction (it does it nicely no complaints) but i want another version that sends repetitive key presses, for example, the more i move my mouse in the right or left or up/down direction the more it presses a specific key (repetitively), however, i should point out that when i tested the script, i found that when moving the mouse really slow it presses ( depending on the keys you assigned ) repetitively, but in that speed (really slowly) it really becomes none usable.
This script is to be used on many creative applications (adobe and such) so it would really help a lot of peeps in the future who will search for something like this, therefore I'm really grateful for any attempt
Code: Select all
F6:: ;On/Off with key F6
IF Toggle := !Toggle
{
MouseGetPos, XOld
SetTimer, MouseTimer, 100
}
Else
SetTimer, MouseTimer, Off
Return
MouseTimer:
MouseGetPos, X
Key =
IF (X < XOld)
Key = Numpad4 ;left direction
Else If (X > XOld)
Key = Numpad6 ;right direction
XOld := X
If (Key = KeyOld)
Return
IF KeyOld
Send, {%KeyOld% Up}
IF KeyOld := Key
Send, {%Key% Down}
Return