mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2008
Posts: 95
A
Babel fish
OP Offline
Babel fish
A
Joined: Dec 2008
Posts: 95
Hi my dear mIRC friends, I need your help. frown



I've got an on text event and use haltdef to halt mIRC's default text because I'd like to echo it myself.


Both the halting and the echoing works well - almost:
When echoing $1-, multiple spaces aren't shown.

a[SPACE][SPACE][SPACE]b will turn into a[SPACE]b - but I want it to show all three spaces there.

So I looped through $mid($1-,%i,1) and apparently $1- doesn't even hold multiple spaces already.

If it did then I'd use a work-around with control characters to echo them but unfortunately it doesn't.


So yeah, wondering if anyone has messed with this before or got any hints or ideas or even a solution.


Thanks.
smile

Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
The following articles provide the most complete description of the problem as well as workarounds:

The spaces problem, part 1: the art of preserving spaces
The spaces problem, part 2: workarounds and their disadvantages


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Dec 2008
Posts: 95
A
Babel fish
OP Offline
Babel fish
A
Joined: Dec 2008
Posts: 95
Hey qwerty,

thanks a lot for that quick reply, going to check it out,
hope I will be able to solve my problem with that information, thank you.

smile

Joined: Dec 2008
Posts: 95
A
Babel fish
OP Offline
Babel fish
A
Joined: Dec 2008
Posts: 95
Alright, awesome, done it via
$regsubex($gettok($rawmsg,2-,58),/(?<= )(?= )/g,$str($chr(2),2))
now, never knew about $rawmsg before, thanks again. <3

Edit: Also found the spaces.dll which I'm about to check out, awesome.


Link Copied to Clipboard