mIRC Home    About    Download    Register    News    Help

Print Thread
#29069 10/06/03 08:18 PM
J
JoNaS_MaN
JoNaS_MaN
J
$1- of the on input event doesn't return true value if i write:
test(space)(space)(space)(space)(space)test
it returns :
test test
it trim de spaces..

#29070 10/06/03 08:47 PM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
not a bug, just is the way mirc handles tokens. Mirc divides the words by spaced to get $1, $2, ..., $N so any "whitespace" is killed. Same if you had

var %a = 1, %test = 1.......2.3.4.5
while ($gettok(%text, %a, 46)) {
var %N [ $+ [ %a ] ] = $gettok(%test, %a, 46)
/inc %a
}

%N1 = 1
%N2 = 2
%N3 = 3

The multiple delimiters are converted into 1.

#29071 11/06/03 02:50 AM
Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
It would be nice if the $editbox identifer would retain what was in the editbox before the input event, in the input event... Identifers do not have the space problems that aliases and arguments to events have...

#29072 15/06/03 05:11 PM
Q
quizer
quizer
Q
thats an easy case, what if u want 2 count spaces in a string that u have readen in a file?
the only way is to use &binVars.

#29073 16/06/03 10:03 AM
P
pheonix
pheonix
P
or you could use
$str($chr(32),5)

#29074 16/06/03 11:34 PM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
And how would that help. Mirc would still enterpret one space. mirc uses spaces as a token delimiter, i.e. when text is passed, and mirc provides the ability to use $1, $2, $3, ..., $N then all "whitespace" is minimized to 1 space.


Link Copied to Clipboard