Error in alphanumeric use

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
panqueso
Posts: 30
Joined: 12 Jul 2018, 15:09

Error in alphanumeric use

16 Jul 2018, 09:17

My script generates an error when using combinations with 3 alphanumeric characters, example:

O1Z :: Click 165,383
13F :: Click 124,381
H21 :: Click 122,212

But this error does not occur when I use commands like

^#f::Click 165,383
#+1::Click 124,381
^!N::Click 122,212

Any suggestions, please?
Rohwedder
Posts: 7630
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Error in alphanumeric use

16 Jul 2018, 10:11

Hallo,
you have to distinguish between Hotkeys (key combinations) like ^#f and Hotstrings (text) like O1Z.
Try these Hotstrings:

Code: Select all

:*X:O1Z::Click 165,383
:*X:13F::Click 124,381
:*X:H21::Click 122,212
User avatar
panqueso
Posts: 30
Joined: 12 Jul 2018, 15:09

Help

16 Jul 2018, 10:34

I tried It still does not work. My intention is that by holding down O followed by 1 followed by Z click on that coordinates.
gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: Error in alphanumeric use

16 Jul 2018, 16:29

O1Z :: Click 165,383
This is not how hotkeys work. The symbols for Alt, Ctrl, etc. are modifiers. You can combine several of them with a normal key.

On the other hand, to combine two normal keys (and optional modifiers), you need to use the & symbol: https://autohotkey.com/docs/Hotkeys.htm#combo
But, "ombinations of three or more keys are not supported." One way around it, using GetKeystate(), is mentioned in the docs I linked to above.
Last edited by gregster on 16 Jul 2018, 16:33, edited 2 times in total.
gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: Error in alphanumeric use

16 Jul 2018, 16:32

There is also Helgef's custom LongHotkey class that tries to work around these limitations.
User avatar
panqueso
Posts: 30
Joined: 12 Jul 2018, 15:09

¡Rohwedder!

20 Jul 2018, 00:26

Sorry for saying that your script did not work. What happens is that I already had a structured script and there was a "condition" that did not allow the script you suggested to me to work. Apologies.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 319 guests