Help with Alt Key send Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
benjaloo
Posts: 3
Joined: 28 May 2022, 08:15

Help with Alt Key send

Post by benjaloo » 28 May 2022, 09:25

Hope you all can help.

I have a 3rd party App(Switcheroo) which is invoked by a global hotkey keystroke combo, limited to Alt+ character key combinations.
I want my AHK script to invoke that app by sending the relevant keystrokes when I run my script. I have tried setting Switcheroo to be invoked by Alt` (Backtick) and it works fine with manual keystrokes.

I wrote the script

Send,!`

and that didn't invoke Switcheroo. Instead, it seemed to send {Alt} alone, as all my menus were highlighted as if I had manually pressed only the Alt key.

I have tried numerous variations and gotten the same result each time:

1. I tried switching from the backtick` to a backslash\
2. I tried using SendPlay instead of Send
3. I tried using SetKeyDelay,-1 before the Send thinking maybe there was too long an interval between the sending of the Alt keystroke before the sending of the backtick keystroke.


Please help!
Many thanks in advance-
Ben

User avatar
mikeyww
Posts: 26601
Joined: 09 Sep 2014, 18:38

Re: Help with Alt Key send  Topic is solved

Post by mikeyww » 28 May 2022, 10:19

Code: Select all

Send !``
Check the KeyHistory.

Explained: Escape sequences

benjaloo
Posts: 3
Joined: 28 May 2022, 08:15

Re: Help with Alt Key send

Post by benjaloo » 28 May 2022, 17:11

Thanks so much for the suggestions.

I had tried the backslash as an alternative to the backtick with that idea in mind. Not sure why that didn't work since backslash is not on the list of characters needing escaping, but after your suggestion, I tried escaping the backtick by duplicating it Send !`` and it worked!

Many thanks!

Ben

Post Reply

Return to “Ask for Help (v1)”