0
votes

I have this script

+#^a:: 
SetTitleMatchMode 2
IfWinExist InterCounter
{
    WinActivate
    Send x
    Send !{ESC}
}
return

after using it, alt stays pressed and I have to press alt on my keyboard to get to normal state (no key pressed). If I forget to do it and type something, a key shortcut is initiated. If I type SPACE for example, ALT+SPACE is pressed.

I tried various things. {Alt up} and other. They did not work. Where is the problem? Is there a fix for my script?

1
what version of AutoHotkey are you using?vasili111
1.1.11.01. After your question I went and downloaded the current stable (1.1.16.05) and tested out. Still the same behaviour.Ev0oD
I tested your script, only replaced "InterCounter" to "Notepad" and Alt key does not stays pressed after hotkey execution. I tested on Windows 8 x64.vasili111
Try to replace "InterCounter" with "Notepad" and use your code with notepad. Maybe Alt is down because something is doing InterCounter and not the script you posted. Also run your script with admin privileges.vasili111
Well, InterCounter is actually just a name of a notepad file. I am currently doing it with notepad - so the problem is not there. Also, I have been trying to use this script with Microsoft OneNote with the same results, so it's not target program specific issue.Ev0oD

1 Answers

0
votes

(would do that in a comment if I could)

try to Send , {ALT down}{ALT up} which should do the trick. If not something else is interfering, like a 3d party program. Try close everything on your system except notepad and the AHK-script and see if that helps.