Script issue with symbols

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Jan1ce
Posts: 2
Joined: 17 Apr 2021, 02:58

Script issue with symbols

Post by Jan1ce » 17 Apr 2021, 03:05

This forum is a bit techy for me! Anyway, I have a problem with creating hotkeys - If there is a symbol, the script fails and stops at the first symbol. I have used a hotkey command for a couple of complicated strong passwords (ones I can't ask my software to remember) which must contain symbols but they fail every time they reach the symbol. Is this known? Is there a way around it? Simple answers please. I'm no geek!
Last edited by gregster on 17 Apr 2021, 13:13, edited 1 time in total.
Reason: Topic moved to 'Ask For Help' (v1).

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Script issue with symbols

Post by swagfag » 17 Apr 2021, 05:14

with no examples, theres nothing to go off of.
post ur script, restate what u think is wrong with it and what u expect it to do, then analysis can be performed

Jan1ce
Posts: 2
Joined: 17 Apr 2021, 02:58

Re: Script issue with symbols

Post by Jan1ce » 17 Apr 2021, 13:11

Sorry, @swagfag - I didn't think there was any need and I wasn't keen to share a password! However... my script is

Code: Select all

^b::
Send, x7hK3#$Y0rKa2tMZw)6^EO^B
Return
When I hit Ctrl B, it types out x7hK3 and stops before # so it seems that the # is creating a block. I would say that Auto Hotkey doesn't like symbols, but I have scripts with @ in them that will execute in full. It may also help to know that my previous script had a plus sign at the end but no other symbols. The script also stopped before the + but it was easy enough to just add that one symbol myself. Does that help or confuse?

gregster
Posts: 8916
Joined: 30 Sep 2013, 06:48

Re: Script issue with symbols

Post by gregster » 17 Apr 2021, 13:16

# acts like - a few other symbols - as a modifier while sending characters; see right at the top of the Send docs:
https://www.autohotkey.com/docs/commands/Send.htm#Parameters wrote:By default (that is, if neither SendRaw nor the Raw mode or Text mode is used), the characters ^+!#{} have a special meaning. The characters ^+!# represent the modifier keys Ctrl, Shift, Alt and Win. They affect only the very next key. To send the corresponding modifier key on its own, enclose the key name in braces.
In this case here, I would probably try

Code: Select all

Send, {text}x7hK3#$Y0rKa2tMZw)6^EO^B

PS: I moved your topic to normal 'Ask For Help' (v1), since your code doesn't seem to be v2 alpha code.

Post Reply

Return to “Ask for Help (v1)”