How to insert a particular character symbol? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Mike_Fay
Posts: 14
Joined: 17 Nov 2019, 13:38

How to insert a particular character symbol?

27 Oct 2021, 09:10

Hi, on my tiny personal wiki, I am trying to insert an en-dash and other symbols as can be found on this MediaWiki page: https://meta.wikimedia.org/wiki/Help:Special_characters

I can google a lot of help on inserting symbols but part of my problem is I don't even know what symbol system is being used there. Also I am pasting into the wiki editing screen in a Chrome browser, so none of the MS Office tricks work. In fact I've tried very hard but can't figure out the Alt-Numpad codes for the en-dash and other symbols seen on that page.

At this point I have resorted to simply copying and pasting. It works fine, but it's pretty annoying to keep popping over to some other page just to copy a symbol.

I'm a little lost. Could anyone help? I'm using AHK v1.1.31.01 on a PC with auto-updated Win10 and auto-updated Chrome.
Rohwedder
Posts: 7630
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: How to insert a particular character symbol?

27 Oct 2021, 09:39

Hallo,
see: https://en.wikipedia.org/wiki/Dash#Unicode
The unicode of EN DASH is U+2013
Try:

Code: Select all

q::Send, {U+2013}
Last edited by Rohwedder on 27 Oct 2021, 09:43, edited 1 time in total.
User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: How to insert a particular character symbol?

27 Oct 2021, 09:40

Another here; I did not see Rohwedder's post earlier.

Code: Select all

::nd::–
Type SpaceNDSpace.
Lepes
Posts: 141
Joined: 06 May 2021, 07:32
Location: Spain

Re: How to insert a particular character symbol?

27 Oct 2021, 09:45

https://en.wikipedia.org/wiki/Character_Map_(Windows)#:~:text=Character%20Map%20is%20a%20utility,in%20lieu%20of%20typing%20them.

I think that application is already installed on every windows, just search "character Map" to find out the code.
User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: How to insert a particular character symbol?

27 Oct 2021, 09:47

I use a whole bunch of these things with hotstrings, because I can never remember the numbers, but then I forget what the hotstrings are.... :)
GEV
Posts: 1002
Joined: 25 Feb 2014, 00:50

Re: How to insert a particular character symbol?

27 Oct 2021, 09:49

Most of those symbols (if not all) can you send in AHK by using the Send {Text} . command AFAIK.

Code: Select all

; Ctrl+Shift+a
^+a::Send {Text}@
User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: How to insert a particular character symbol?  Topic is solved

27 Oct 2021, 09:51

Sure, simple enough even as:

Code: Select all

F3::Send –
Mike_Fay
Posts: 14
Joined: 17 Nov 2019, 13:38

Re: How to insert a particular character symbol?

27 Oct 2021, 11:45

Nice! Thank you, @GEV @Lepes @Rohwedder and especially @mikeyww. You've given me a lot of tools for working with special characters. I really need them! :bravo:

Lepes, I knew about the Windows Character Map but it can be a real pain to find a particular character in... there's no search box per se. However you inspired me to fire it up again and I found the en dash easily enough. Lo and hold, Alt-Numpad 0150 works fine. I could swear I tried that before. Probably many times. Is there some weird thing where sometimes it works and sometimes doesn't? (rhetorical question) Sometimes I kinda give up on all this stuff, ya know? Anyway, I'll keep using it now.

You've all given me some great lookup tables and other ideas for using Unicodes and special characters, with AHK. I'll be using them.

I know what you mean, mikeyww!
Mike_Fay
Posts: 14
Joined: 17 Nov 2019, 13:38

Re: How to insert a particular character symbol?

27 Oct 2021, 11:52

mikeyww wrote:
27 Oct 2021, 09:40

Code: Select all

::nd::–
Type SpaceNDSpace.
Thanks but I'm not sure I'm following ... are you saying I can set up my wiki editor to allow me to use SpaceNDSpace as a substitution of sorts, that I can use from then on? This would be great; then I don't have to remember Alt-0150.

But where would I set it up? On the particular wiki page in question? Or maybe somewhere like my Mediawiki's common.css or something?

Or maybe you mean in AHK? If so, I can't recall that type of hotkey-creation approach before. Is there a name for it? (a text-substitution hotkey?)

Thanks!
User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: How to insert a particular character symbol?

27 Oct 2021, 12:14

Exactly right. This is an AHK script that shows a :arrow: hotstring.
User avatar
flyingDman
Posts: 2817
Joined: 29 Sep 2013, 19:01

Re: How to insert a particular character symbol?

27 Oct 2021, 14:01

If the Character Map is difficult to navigate, create your own. Here with the character-set you mentioned. Click and insert (Save as UTF w/ BOM):

Code: Select all

var = ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÑÒÓÔŒÕÖØÙÚÛÜßàáâãäåæçèéêëìíîïñòóôœõöøùúûüÿ¿¡«»§¶†‡•-–—™©®¢€¥£₤¤αβγδεζηθικλμνξοπρσςτυφχψωΓΔΘΛΞΠΣΦΨΩ∫∑∏√−±∞≈∝≡≠≤≥×·÷∂′″∇‰°∴ø∈∩∪⊂⊃⊆⊇¬∧∨∃∀⇒⇔→↔↑ℵ∉°₀₁₂₃₄₅₆₇₈₉⁰¹²³⁴⁵⁶⁷⁸⁹

f12::
w:=20, cnt := 14, arr := strsplit(var)
gui, new
gui, -caption
gui, margin, 0,0
gui, font, s10
loop,% arr.count()
	{
	x := mod((a_index - 1),cnt) * w, y := floor((a_index - 1)/ cnt) * w
	gui, add, text, x%x% y%y% w%w% h%w% center vz%a_index% ginsert,% arr[a_index]
	}
gui, show
return

insert:
gui,submit
send % arr[substr(A_GuiControl,2)]
return

esc::
exitapp
14.3 & 1.3.7
Mike_Fay
Posts: 14
Joined: 17 Nov 2019, 13:38

Re: How to insert a particular character symbol?

27 Oct 2021, 16:32

Wow, that's cool! Thanks for that, @flyingDman !
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: How to insert a particular character symbol?

27 Oct 2021, 17:36

flyingDman wrote:
27 Oct 2021, 14:01
If the Character Map is difficult to navigate, create your own. Here with the character-set you mentioned. Click and insert (Save as UTF w/ BOM):
Genius! Thanks!
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: ConnorMcLoud, Google [Bot] and 166 guests