Script only works sometimes

Get help with using AutoHotkey and its commands and hotkeys
Slimey
Posts: 2
Joined: 21 Feb 2018, 18:14

Script only works sometimes

21 Feb 2018, 18:31

I wrote a simple script (and have tried a few variations of it as well).



Right Alt + Right Shift + 7 = Does nothing
Left Alt + Left Shift + 7 = Works
Right Alt + Right Shift + 7 = Now works a few times

Advice?
User avatar
RunarSF
Posts: 27
Joined: 01 Jul 2017, 11:48
GitHub: RunarSF
Location: Norway
Contact:

Re: Script only works sometimes

21 Feb 2018, 22:08

I'm guessing your right alt key is an AltGr key, if that is the case, this code should work. More info on hotkeys can be found in the documentation.

Code: [Select all] [Download] GeSHi © Codebox Plus

#SingleInstance, Force
<^>!+7::SendRaw, |
!+7::SendRaw, |
<^>!7::SendRaw, \
!7::SendRaw, \
There are two kinds of people in the world: those who can extrapolate from incomplete data.
Slimey
Posts: 2
Joined: 21 Feb 2018, 18:14

Re: Script only works sometimes

22 Feb 2018, 13:38

RunarSF wrote:I'm guessing your right alt key is an AltGr key, if that is the case, this code should work. More info on hotkeys can be found in the documentation.

Code: [Select all] [Download] GeSHi © Codebox Plus

#SingleInstance, Force
<^>!+7::SendRaw, |
!+7::SendRaw, |
<^>!7::SendRaw, \
!7::SendRaw, \


Holy crap, that worked! I LOVE YOU <3

But the weird thing is that its not an AltGr key and I tried the AlrGr syntax before... Maybe it was the Returns that messed it up?
User avatar
RunarSF
Posts: 27
Joined: 01 Jul 2017, 11:48
GitHub: RunarSF
Location: Norway
Contact:

Re: Script only works sometimes

22 Feb 2018, 17:54

Slimey wrote:
RunarSF wrote:I'm guessing your right alt key is an AltGr key, if that is the case, this code should work. More info on hotkeys can be found in the documentation.

Code: [Select all] [Download] GeSHi © Codebox Plus

#SingleInstance, Force
<^>!+7::SendRaw, |
!+7::SendRaw, |
<^>!7::SendRaw, \
!7::SendRaw, \


Holy crap, that worked! I LOVE YOU <3

But the weird thing is that its not an AltGr key and I tried the AlrGr syntax before... Maybe it was the Returns that messed it up?


I just shortened your code down a bit, since you only have one thing the hotkeys do, you can have them on the same line without the return, so that wouldn't have been your problem. It's most likely that AHK wanted you to define the actual right alt key, and not just alt, I did stumble upon some weird errors there too though, so I'm not really sure. Really happy to hear it worked out in the end though! Happy to help :)
(Could you click the Set topic as solved button on the post with the script? Thanks.)
There are two kinds of people in the world: those who can extrapolate from incomplete data.

Return to “Ask For Help”

Who is online

Users browsing this forum: newbieforever, tmplinshi and 35 guests