|
|
Joined: Jul 2006
Posts: 4,020
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2006
Posts: 4,020 |
/window stops at the first pair of quotes: //window -h @test | window -h @test""ing | window -a "@test""ing" just actives @test, instead of @test""ing
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Dec 2002
Posts: 3,840
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,840 |
Thanks for your bug report. This is the intended behaviour. The scripting language does not support escaped characters, which would be required to parse quotes within quotes, so it only checks for a quote at the start of a line and terminates at the next enclosing quote. This method is used by almost all features in the scripting language.
|
|
|
|
Joined: Jul 2006
Posts: 4,020
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2006
Posts: 4,020 |
Yes I know, what I'm saying is it's a problem, one that can't be worked around, the intended behavior is simply wrong, objectively speaking, since it breaks the IRC protocol itself (which allows quotes in channel name), and needs to change. Are there any plan on implementing this escape character?
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Apr 2004
Posts: 700
Hoopy frood
|
Hoopy frood
Joined: Apr 2004
Posts: 700 |
one that can't be worked around Can't you always do something like $iif($chr(32) isin %window,$qt(%window),%window)? Without outer quotes it does seem to activate the right window, and no channel name will have spaces. In fact I think it's guaranteed that no window name will have both spaces and quotes in it, or? (I'm not saying the current situation is great..)
Saturn, QuakeNet staff
|
|
|
|
Joined: Jul 2006
Posts: 4,020
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2006
Posts: 4,020 |
I suppose you mean $chr(34), I probably spoke too soon, it can be worked around then.. but that's just annoying to use, and if you're concerned with speed execution, you need to turn that into if/else which is even more annoying!
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Apr 2004
Posts: 700
Hoopy frood
|
Hoopy frood
Joined: Apr 2004
Posts: 700 |
This one was testing for spaces; with $chr(34) the t/f cases would have to be reversed as well. It's the idea that counts anyway  . If it's impossible for Khaled to change the current behavior at this point, a second best option could be a new built-in $windowqt() identifier.
Saturn, QuakeNet staff
|
|
|
|
Joined: Jul 2006
Posts: 4,020
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2006
Posts: 4,020 |
Yeah, I misread sorry. $windowqt might be the best option here, avoiding the troubles of $iif's slowness or two lines if/else, although I don't think it would be used that much in script calling /window on unknown/dynamical window's name because nobody would know about using it until they actually meet the problem, and frankly who even use quotes in channel name? I just reported the problem because from a logical point of view it's completely broken and somehow deep inside you don't want mIRC to have such issues, right?
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
|
|