I'm trying to develop a script which allows me to have 3 hotkeys configured which have the same first button to initialize them.
The hotkeys I'm trying to develop are:
1) When pressing and holding MButton, autohotkey maps it to hold Ctrl+MButton
2) When pressing and holding MButton+LButton, autohotkey maps it to hold MButton
3) When pressing and holding MButton and making a click on LButton, autohotkey maps it to hold Shift+MButton
The issue developing this is that when I press MButton, there's no way for the script to know if I intend to also press LButton or making the LButton click to also trigger the 2) and 3) hotkeys.
At the moment, the most advanced code I managed to reach is:
Code: Select all
#If WinActive("ahk_exe SLDWORKS.exe")
MButton::
send, {ctrl down}{Mbutton down}
return
MButton up::
send, {ctrl up}{Mbutton up}
return
mbutton & rbutton::
var = 1
send, {ctrl up}
send, {MButton down}
return
#if var
rbutton up::
mbutton up::
send, {MButton up}
var = 0
return
#if
Hope any of you can kindly help me. Thank you very much in advance!