Has anyone had troubles with AutoHotKey on Windows 10?
I have an AutoHotKey .exe I have used for years on Windows 7 with no problems.
When I first start it on Windows 10, it works fine but about 30 minutes later the functions are being executed when I haven’t called the shortcut commands.
For example:
I have one that types my email address which is triggered by Windows Key + e
When I am typing a word that contains the letter e, the function will start writing my email even though I didn’t press the Windows key.
Troubles on Windows 10
-
- Posts: 8
- Joined: 19 May 2017, 16:08
-
- Posts: 8
- Joined: 19 May 2017, 16:08
Re: Troubles on Windows 10
Any ideas or suggestions?
- WalkerOfTheDay
- Posts: 710
- Joined: 24 Mar 2016, 03:01
Re: Troubles on Windows 10
Looks like a 'stuck' Windows key. I sometimes get this too, but not only in Windows 10.
I don't even think it's AHK related. A lot of people have this. Just google 'Stuck windows key' and you'll get
loads of hits.
I just ram the Windows key a couple of times and it goes away. What happens when you press other
keys that don't have a hotkey assigned, for instance the R key ?
Does it open the 'Run' box ?
I don't even think it's AHK related. A lot of people have this. Just google 'Stuck windows key' and you'll get
loads of hits.
I just ram the Windows key a couple of times and it goes away. What happens when you press other
keys that don't have a hotkey assigned, for instance the R key ?
Does it open the 'Run' box ?
-
- Posts: 8
- Joined: 19 May 2017, 16:08
Re: Troubles on Windows 10
I just shook and blew out my keyboard, there was a little bit of dust. We will see if it continues to happen and if it does I will try another letter I have a different shortcut set on. Thanks
-
- Posts: 8
- Joined: 19 May 2017, 16:08
Re: Troubles on Windows 10
It occurred again, this time I didn't have the USB keyboard attached, I was using the MS Surface Book attached keyboard.
It didn't bring up the run box and pressing the other shortcut letters didn't run the functions.
It didn't bring up the run box and pressing the other shortcut letters didn't run the functions.
Re: Troubles on Windows 10
I had this problem with my "Win + Ctrl + L = Standby" hotkey. My idea was that Autohotkey misses the Win (or Ctrl) Down event when the key is released while the PC is going in Standby. After waking up Autohotkey still thinks the key is down.
I fixed this with a KeyWait, Ctrl command. This way the hotkey is only fired after Autohotkey sees the 'down event'.
Let me know if this helps.
I fixed this with a KeyWait, Ctrl command. This way the hotkey is only fired after Autohotkey sees the 'down event'.
Let me know if this helps.
-
- Posts: 8
- Joined: 19 May 2017, 16:08
Re: Troubles on Windows 10
DyaTactic, would you please post an example of how you use the KeyWait Ctrl command? I was looking at help and I can get it to work with a single key, but I am having troubles with getting it to work with two keys (Windows Key + e).
Re: Troubles on Windows 10
Here is my reply. Better late then never. Hope this makes thing clear.
Code: Select all
>^#l:: ; Win Lock & Sleep.
KeyWait RCtrl ; If there is no delay Autohotkey misses the {Ctrl Up} event, due to the locked pc?. So after logging in again, pressing #L will trigger this hotkey (and other ^ hotkeys) because of it.
DllCall("LockWorkStation") ; Lock pc.
SLEEP 1000
DllCall("PowrProf\SetSuspendState", "int", 0, "int", 0, "int", 0) ; Put pc in Standby.
Return
-
- Posts: 8
- Joined: 19 May 2017, 16:08
Re: Troubles on Windows 10
So if my script looks like this:
LAlt & e::
send {m}{y}{e}{m}{a}{i}{l}{@}{t}{e}{s}{t}{.}{c}{o}{m}
return
Do I change it to this?
KeyWait LAlt
LAlt & e::
send {m}{y}{e}{m}{a}{i}{l}{@}{t}{e}{s}{t}{.}{c}{o}{m}
return
LAlt & e::
send {m}{y}{e}{m}{a}{i}{l}{@}{t}{e}{s}{t}{.}{c}{o}{m}
return
Do I change it to this?
KeyWait LAlt
LAlt & e::
send {m}{y}{e}{m}{a}{i}{l}{@}{t}{e}{s}{t}{.}{c}{o}{m}
return
Re: Troubles on Windows 10
Almost
But your code does not give any problems on my pc.
Is there a reason you put all the chracters in brackets?
This code works too:
I think the stuck Win key is caused by another hotkey, assuming it is caused by Autohotkey. Though it is worth trying the KeyWait command.
Let me know how it worked.
Code: Select all
LAlt & e::
KeyWait LAlt
send {m}{y}{e}{m}{a}{i}{l}{@}{t}{e}{s}{t}{.}{c}{o}{m}
return
Is there a reason you put all the chracters in brackets?
This code works too:
Code: Select all
LAlt & e::
Send [email protected]
Return
Let me know how it worked.
-
- Posts: 8
- Joined: 19 May 2017, 16:08
Re: Troubles on Windows 10
I put the brackets because that was how I saw other people were doing multiple non-alpha keys to make a shortcut, it matters for special characters. Without the brackets the alpha characters work fine, but the special characters won't be sent.
So the KeyWait only needs to be in the job a single time correct? If I have multiple short cuts which use the windows key and the alt keys I can do this only at the top of the job?
KeyWait #
KeyWait RAlt
KeyWait LAlt
So the KeyWait only needs to be in the job a single time correct? If I have multiple short cuts which use the windows key and the alt keys I can do this only at the top of the job?
KeyWait #
KeyWait RAlt
KeyWait LAlt
Re: Troubles on Windows 10
When sending certain keystrokes the brackes are essential. The !, ^, # for example need to be placed in brackets otherwise the Alt, Ctrl or Win key will be pressed. Also keys called by name like {Enter} and {Backspace} also require brackets.
Indeed the KeyWait command should be put direcly after defining the shortcut (i.e. under the ‘LAlt & e::’ line). If you dont know what hotkey is causing the stuck key you can add this line under each shortcut.
Indeed the KeyWait command should be put direcly after defining the shortcut (i.e. under the ‘LAlt & e::’ line). If you dont know what hotkey is causing the stuck key you can add this line under each shortcut.
-
- Posts: 8
- Joined: 19 May 2017, 16:08
Re: Troubles on Windows 10
This is still giving me troubles. I removed everything in the script except the one function and the issue still occurs With AutoHot key case of words doesn't matter correct?
For example, send vs Send or return vs Return.
LAlt & e::
KeyWait LAlt
send {m}{y}{e}{m}{a}{i}{l}{@}{t}{e}{s}{t}{.}{c}{o}{m}
return
For example, send vs Send or return vs Return.
LAlt & e::
KeyWait LAlt
send {m}{y}{e}{m}{a}{i}{l}{@}{t}{e}{s}{t}{.}{c}{o}{m}
return
Re: Troubles on Windows 10
I can't help you further. I have no clue what is causing this. I'm sorry.
Hope you or someone els on this forum can find something.
Hope you or someone els on this forum can find something.
Re: Troubles on Windows 10
Work around it by using a hotstring replacement instead of using the Windows key?
I use the following so every time I type the @ sign twice, AHK automatically replaces the 2 @ signs with my email address.
:*:@@::[email protected]
Hope this helps...
I use the following so every time I type the @ sign twice, AHK automatically replaces the 2 @ signs with my email address.
:*:@@::[email protected]
Hope this helps...
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Tvlao and 309 guests