mIRC Home    About    Download    Register    News    Help

Print Thread
#98231 21/09/04 10:01 PM
Joined: Apr 2004
Posts: 48
L
Leoric Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Apr 2004
Posts: 48
the phrase 'test testing' are not parsed correctly by mirc scripting because it have a blank space (chr32) after another, between the words test and testing. so if i make an "autocolor" like this:

on *:input:*:{
if (/* !iswm $1) && (!$ctrlenter) {
var %prefix = $chr(3) $+ 7
say %prefix $+ $1-

halt
}
}

and type the phrase "test testing", it will say "test testing" in orange, and a space will be lost. but if exists a binvar &args that store the phrase exactly as i type, that would be set in all events that sets an $1-, i can do this:

on *:input:*:{
if (/* !iswm $1) && (!$ctrlenter) {
breplace &args 32 160
tokenize 32 $bvar(&args,$bvar(&args,0)).text

var %prefix = $chr(3) $+ 7
say %prefix $+ $1-

halt
}
}

so at least visually the space is not lost. and if a have a switch like -b in /raw (and as well in /say and etc) that is used /raw -b &binvar, to send a binvar to the server, i can do this:

on *:input:*:{
if (/* !iswm $1) && (!$ctrlenter) {
var %prefix = $chr(3) $+ 7

bcopy &args $len(%prefix) &args 1 $bvar(&args,0)
bset -t &args 1 %prefix

say -b &args

halt
}
}


__________
dark_light @ irc.brasnet.org
#98232 22/09/04 09:17 PM
Joined: Aug 2004
Posts: 101
D
Vogon poet
Offline
Vogon poet
D
Joined: Aug 2004
Posts: 101
The bad handling of multiple spaces in mIRC events, commands and aliases has been discussed several times throughout the forums.
I agree there should be an identifier with exactly what you typed in an editbox for the on input event and that somehow commands (or at least /raw) could be made to keep multiple spaces. The -b idea is excellent!


Maybe I wake up one day to notice that all my life was just a dream!
#98233 24/09/04 12:17 AM
Joined: Apr 2004
Posts: 48
L
Leoric Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Apr 2004
Posts: 48
ah, i forgot. an /echo -b &binvar would be great too.


__________
dark_light @ irc.brasnet.org

Link Copied to Clipboard