Set spezial Letter between every Letter

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
armin889
Posts: 96
Joined: 02 Nov 2021, 15:11

Set spezial Letter between every Letter

Post by armin889 » 11 Aug 2022, 17:46

Hello ahk community
I have a word in my variable. For example, the word is "TEST" . Now I want to make a special Letter between every Letter of the word TEST. The special letter is Unicode number U+200B. Then I want to copy it to the clipboard.

Anyone have an idea how this could work?

thx a lot

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

Re: Set spezial Letter between every Letter

Post by swagfag » 11 Aug 2022, 17:52

Code: Select all

if !A_IsUnicode
{
	MsgBox stop using ANSI
	ExitApp
}

MsgBox % Clipboard := RegExReplace("TEST", "(.)(?!$)", "$1" Chr(0x200B))

armin889
Posts: 96
Joined: 02 Nov 2021, 15:11

Re: Set spezial Letter between every Letter

Post by armin889 » 11 Aug 2022, 18:18

thanks so much wow work perfect
how can I do without this msgbox?

User avatar
boiler
Posts: 16770
Joined: 21 Dec 2014, 02:44

Re: Set spezial Letter between every Letter

Post by boiler » 11 Aug 2022, 18:33

I suggest you take it as a challenge to figure that out. Ask the same question to yourself: "how can I do without this msgbox?" and try the first thing that comes to mind.

armin889
Posts: 96
Joined: 02 Nov 2021, 15:11

Re: Set spezial Letter between every Letter

Post by armin889 » 11 Aug 2022, 18:55

thx i got it

Post Reply

Return to “Ask for Help (v1)”