How do I output the # character

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
omar
Posts: 545
Joined: 22 Oct 2015, 17:56

How do I output the # character

03 Dec 2023, 16:05

Seems to be impossible!

I've tried:

Code: Select all

::]code::

SendInput # ; Doesn't work - prints nothing

SendInput `# ; Doesn't work -prints nothing

SendInput % "#"  ; Doesn't work -prints nothing

SendInput % "`#"  ; Doesn't work -prints nothing

my_output_string := chr(35) ; Doesn't work -prints nothing

SendInput % "=========="
SendInput % my_output_string
SendInput % "=========="

Return
What am I doing wrong?

Google has no answers.
Chat GPT has no answers - it says I can simply do a 'Send #' - that doesn't work either.

Where am I going wrong?
gregster
Posts: 9113
Joined: 30 Sep 2013, 06:48

Re: How do I output the # character

03 Dec 2023, 16:07

I would look into the AHK docs for Send/SendInput: --> especially the list of key names: https://www.autohotkey.com/docs/v1/lib/Send.htm#keynames

Code: Select all

SendInput {#}
or SendInput {text}# or raw mode.
User avatar
JoeWinograd
Posts: 2214
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: How do I output the # character

03 Dec 2023, 16:14

From the Send doc:
SendRaw: Similar to Send, except that all characters in Keys are interpreted and sent literally.
Thus:

SendRaw #

Regards, Joe
omar
Posts: 545
Joined: 22 Oct 2015, 17:56

Re: How do I output the # character

03 Dec 2023, 16:14

perfect!
That works nicely!
Thanks

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: peter_ahk and 345 guests