I've been scowering the internet trying to figure this one out and the struggle is real....
The goal:
I Hold down Rbutton and it sends a keystroke repeatedly (ex: Hold Right Mouse and send "6" keystoke.
Now if I press Shift while holding down Rbutton, it sends Shift+6 (+6)
if I press Alt while holding down Rbutton send Alt+6
if I press Ctrl while holding down Rbutton send Ctrl +6
Essentially as long as Im holding Rbutton, 6 should be sending in some form, 6 or ^6 or !6 or +6, as a loop
My latest attempt is below; I have gotten the Alt+Right Click to send 6 but not repeating.... been trying to babystep my way there but no luck.
Any more intelligent/capable individuals wanting to give their input would be greatly appreciated... im a noob and this is what i've figured out in the last 10 hours...sad i know.
Code: Select all
#IfWinActive
#SingleInstance force
#NoEnv
#Warn
#Persistent
#MaxThreadsPerHotkey 2
#IfWinActive
~End::
WinActivate ahk_exe notepad++.exe
return
#ifwinactive ahk_exe notepad++.exe
~^s::
reload
return
#ifwinactive
<!RButton:: ; Alt + Left Mouse Button
if GetKeyState("LAlt","p") ; Repeat as long as Left Alt Button is held down
{
if GetKeyState("Rbutton","p") ;repeat as long as Left alt AND Rbutton are held down
{
send 6
}
else
{
msgbox, no Rbutton
}
Return
}
else
{
msgbox, No Left Alt
}
Return