Why does ^a:: works but not !a::

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
JPh1
Posts: 42
Joined: 18 Jan 2018, 22:06

Why does ^a:: works but not !a::

20 Aug 2018, 10:56

This code works:

^a::
Send !v
Send e
return

But if I replace ^a with !a, it doesn't. Can someone tell me why?
JPh1
Posts: 42
Joined: 18 Jan 2018, 22:06

Re: Why does ^a:: works but not !a::

20 Aug 2018, 11:09

I mean the code using the alt doesn't work.

!a::
Send !v
Send e
return

Why is that?
MannyKSoSo
Posts: 440
Joined: 28 Apr 2018, 21:59

Re: Why does ^a:: works but not !a::

20 Aug 2018, 11:12

When I use the command it works fine for me, maybe your keyboard for that alt key you are using is broken?
JPh1
Posts: 42
Joined: 18 Jan 2018, 22:06

Re: Why does ^a:: works but not !a::

20 Aug 2018, 11:17

Thanks for trying it. That's rather strange, not only !a doesn't work for me but neither do !g or any !x (where x is a letter). And my Alt key is definitely not broken.
User avatar
Scr1pter
Posts: 1272
Joined: 06 Aug 2017, 08:21
Location: Germany

Re: Why does ^a:: works but not !a::

21 Aug 2018, 05:11

What is the target application?

I think the issue could be that you're using Alt two times in a row without any delay.
Alt+A, then Alt+V.
Some days ago I faced a similar issue.
My script got activated by Ctrl+Shift+F1, and the first command was Ctrl+C.
It happened several times that it didn't work.
After this I changed the activation hotkey to Shift+F1.
No issue after that!

Alternatively, you can add a sleep value (for test purposes):

Code: Select all

!a:: 
Sleep, 100
Send !v
Send e
return
P.S: Since your script works with Ctrl+A, I don't think your Alt key is broken because your script contains Alt+V.

Regards
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 356 guests