As old as this thread is, I submit that this is not truly a necro, because I have a follow-up question to the exact solution originally suggested here (thank you @Dorugami!)
The script I've been using to this point is as follows:
Code: Select all
z::Send % "{Click " . ( GetKeyState("LButton") ? "Up}" : "Down}" )
x::Send % "{Click " . ( GetKeyState("RButton") ? "Up r}" : "Down r}" )
The z-key (seems to be case sensitive and requires lowercase *shrug*) autoswings, and x (also seemingly lowercase-required) auto-interacts.
The reason I say that it seems to be lowercase-sensitive is because when holding LShift around ledges or lava (which I'm doing right now in a large lava level excavation project) the keybinds won't recognize unless I momentarily release the LShift. I dislike even that momentary vulnerability, but I've learned to live with that. My dawning issue now is that I have a desire to develop a keybind to hold LShift, alleviating stress on my poor misbegotten pinky finger.
1.) I note in the script I'm using that the right-click-hold x-keybind uses arguments "Up r}" and "Down r}" whereas the autoswing z-keybind is merely "Up}" and "Down}". I'm phonetically parroting and mimicking here, does anyone have any insight as to the syntactical meaning of the difference between those two argument strings?
2.) In attempting to use the following as a LShift-hold:
Code: Select all
c::Send % "{Shift" . ( GetKeyState("Shift") ? "Up}" : "Down}" )
... I note that the only way to un-toggle the LShift-hold is to tap LShift. In the z- and x-keybinds, I can toggle-off
either by clicking / right-clicking (respectively)
or I can re-tap the original keybind. In other words, a second tap to the z-key or the x-key toggles that respective keybind off again, without needing to perform any clicks or right-clicks on the mouse. Re-tapping the c-keybind shown here doesn't toggle-off the LShift-hold keybind. I suspect that this is because the keybind string is mapped to a lowercase-sensitive key.
Therefore, how do I reorient the strings to specify case-insensitive keybinds? I already tried duplicating the lines with a "!z" and "!x" arguments, but that didn't cause behavior that I could explain.
I've attempted to google and search through both the AHK and vMC forums, but I encountered no promising leads toward an answer.