mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2014
Posts: 42
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Aug 2014
Posts: 42
Hi smile
i have a little script:

Code:
set -n %word $read(words.txt,n)
msg # Message: " $+ %word $+ "


I want in the message a "-" between every letter in the %word.
(Only for the message/issue, the word should be set without the symbol!) i have no clue how to do this.


I say thank you to everyone who can help me out! smile

Last edited by Krawalli; 01/04/15 07:17 PM.
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
Code:
alias dashed return $regsubex($1,/(.)/g,$iif(\0 == \n,\1,\1-))


If you need to do the same thing for multiple words it's more complex.

Joined: Aug 2014
Posts: 42
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Aug 2014
Posts: 42
Its working PERFECT!
Thank you very much.

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Also seems to work Loki smile Added bonus; works for full sentences too.

$regsubex($1-,/(\B)/g,\1-)


Well. At least I won lunch.
Good philosophy, see good in bad, I like!

Link Copied to Clipboard