mIRC Home    About    Download    Register    News    Help

Print Thread
#29069 10/06/03 08:18 PM
Joined: Jun 2003
Posts: 47
J
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jun 2003
Posts: 47
$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: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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.


-KingTomato
#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...


NaquadaBomb
www.mirc-dll.com
#29072 15/06/03 05:11 PM
Joined: May 2003
Posts: 32
Q
Ameglian cow
Offline
Ameglian cow
Q
Joined: May 2003
Posts: 32
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
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
or you could use
$str($chr(32),5)


new username: tidy_trax
#29074 16/06/03 11:34 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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.


-KingTomato

Link Copied to Clipboard