HotKey Sequence

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
uwfotoguy
Posts: 3
Joined: 20 Mar 2024, 12:24

HotKey Sequence

20 Mar 2024, 12:38

I'm trying to use a WIN+Z hotkey sequence to run a script.
It's a real simple sequence for a CAD program. Here is the script.

Code: Select all

#z::
{
    Send "e"
    KeyWait "LShift", "u
    Send "ml"
}
So, I click on a POINT in the program and "e" initiates extend point, which I then click the mouse ANYWHERE (a random point) which locks in the new POINT, then I "SHIFT + Mouse Click another point and on the "LShift" release of the key it's suppose to then send the keystrokes "M" & "L" to close the points together to make a closed path.

Any help would be appreciated.
Thx,
Tom

[Mod edit: Added [code][/code] tags. Please use them yourself when posting code!]
uwfotoguy
Posts: 3
Joined: 20 Mar 2024, 12:24

Re: HotKey Sequence

20 Mar 2024, 12:57

Sorry, I pasted the code incorrectly. It was missing the " after the U on LShift up.

Code: Select all

#z::
{
    Send "e"
    KeyWait "LShift", "U"
    Send "ml"
}
[Mod edit: Added [code][/code] tags. Please use them yourself when posting code!]
User avatar
WarlordAkamu67
Posts: 230
Joined: 21 Mar 2023, 06:52

Re: HotKey Sequence

20 Mar 2024, 12:59

Hello! Try

Code: Select all

#z::
{
    Send "e"
    KeyWait "LShift", "d"
    KeyWait "LShift", "u"
    Send "ml"
}
uwfotoguy
Posts: 3
Joined: 20 Mar 2024, 12:24

Re: HotKey Sequence

20 Mar 2024, 13:02

SUCCESS!!!

Thanks WarlordAkamu67
bj8tr
Posts: 14
Joined: 23 Feb 2014, 14:02

Re: HotKey Sequence

20 Mar 2024, 13:05

Or, if you don't mind holding down shift with win and z, and releasing it last when ready...

Code: Select all

#Requires AutoHotkey v2.0
+#z::
{
    Send "e"
    KeyWait "LShift", "Up"
    Send "ml"
}

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: Chunjee and 36 guests