Send {LWin} Issues

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
ryan1431
Posts: 1
Joined: 22 Oct 2018, 08:22

Send {LWin} Issues

22 Oct 2018, 08:37

Hello,

I'm fairly new to Autohotkey, however I think I've figured out the basics.


I'm having trouble sending the windows key with different hotkeys:

Code:
Spoiler

For some weird reason, the first script works (pressing Winkey + N successfully sends the windows key, opening the windows menu, and then sends the rest of the commands). However, any other hotkey/script I try to use to send the Left windows key does not work (the second portion of script). So pressing ctrl + win + n does NOT send the windows key. I've tried sending {LWin Down/Up}, adding sleep time (up to 500), I've even tried changing it to another letter (eg. ^m:: send {LWin}) and it still doesn't send it.

Why would the first script work but the second not? ...since they are basically identical.
eqv
Posts: 72
Joined: 18 Sep 2018, 22:17

Re: Send {LWin} Issues

22 Oct 2018, 21:53

ryan1431 wrote:
22 Oct 2018, 08:37
For some weird reason, the first script works (pressing Winkey + N successfully sends the windows key, opening the windows menu, and then sends the rest of the commands). However, any other hotkey/script I try to use to send the Left windows key does not work (the second portion of script). So pressing ctrl + win + n does NOT send the windows key. I've tried sending {LWin Down/Up}, adding sleep time (up to 500), I've even tried changing it to another letter (eg. ^m:: send {LWin}) and it still doesn't send it.
It's not an AHK problem, but how windows get the hotkey (mix "Ctrl" and "Win").
Try adding some sleep before sending "{LWin}":

Code: Select all

^#n:: 
sleep, 200
send, {LWin}
Return

^m::
sleep, 200
send, {LWin}
Return
In my case, I have to add 200ms before; in your case could be more or less.
Hope it helps,
KiritoSanPlays
Posts: 28
Joined: 13 Jun 2018, 16:24

Re: Send {LWin} Issues

23 Oct 2018, 05:02

also spoilers don't work its better to just use code brackets [code"]"[/code]

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: OrangeCat and 286 guests