mIRC Home    About    Download    Register    News    Help

Topic Options
#101348 - 23/10/04 05:53 AM remote script misinterpretation of colons ":"
alkalineX Offline
Bowl of petunias

Registered: 23/10/04
Posts: 2
mIRC remote scripts misinterprete colons on the "on *:whatever:..."

Example, if i wanted mirc to respond to some certain text or maybe just an emoticon, it does work, i know that i could evaluate it out for all text, or situation... but just to see what would happen if i didnt:

on *:TEXT:*:)*:*:{
...
}

or..

on *:TEXT::):*:{
...
}

now the script thinks the the colon in that smilely is part of syntax.

Top
#101349 - 23/10/04 05:59 AM Re: remote script misinterpretation of colons ":"
Seifer Offline
Fjord artisan

Registered: 11/11/03
Posts: 228
Loc: Melbourne, Australia
I don't see that as a bug.

Top
#101350 - 23/10/04 06:07 AM Re: remote script misinterpretation of colons ":"
tidy_trax Offline
Hoopy frood

Registered: 02/11/03
Posts: 2327
Agreed, an escape character would be useful though:

Code:
on *:text:*[color:red]\[/color]:):#:{ }
_________________________
New username: hixxy

Top
#101351 - 24/10/04 03:21 AM Re: remote script misinterpretation of colons ":"
nalAAlan Offline
Vogon poet

Registered: 04/08/04
Posts: 147
just do
Code:
if (*:asdf:():* iswm $1-) {

Top
#101352 - 24/10/04 10:53 AM Re: remote script misinterpretation of colons ":"
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
As always introducing new meaning to something that could already be in use has the possibility to break a lot of things. I don't see what the problem is with just using on *:TEXT:$($+(*,$asc(58),$asc(41),*)):*:{.
_________________________
Spelling mistakes, grammatical errors, and stupid comments are intentional.

Top
#101353 - 25/10/04 05:23 AM Re: remote script misinterpretation of colons ":"
nalAAlan Offline
Vogon poet

Registered: 04/08/04
Posts: 147
its not readable

Top
#101354 - 25/10/04 09:30 AM Re: remote script misinterpretation of colons ":"
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
I can read it just fine. The parentheses of identifiers make them very easy to follow. At least as much as escape characters or sequences.
_________________________
Spelling mistakes, grammatical errors, and stupid comments are intentional.

Top
#101355 - 25/10/04 12:15 PM Re: remote script misinterpretation of colons ":"
Sat Offline
Hoopy frood

Registered: 19/04/04
Posts: 838
Loc: The Netherlands
($chr though, not $asc)
_________________________
Saturn, QuakeNet staff

Top
#101356 - 25/10/04 11:01 PM Re: remote script misinterpretation of colons ":"
nalAAlan Offline
Vogon poet

Registered: 04/08/04
Posts: 147
so can I, but can the author?

Top
#101357 - 26/10/04 06:57 AM Re: remote script misinterpretation of colons ":"
alkalineX Offline
Bowl of petunias

Registered: 23/10/04
Posts: 2
yes... as i said before, i "know" that i can evaluate it out to see if its true or not, and yes i do use the $chr instead (if i have to)... but like someone said up their ^, an escaping code would be definately nice.


Edited by alkalineX (26/10/04 06:58 AM)

Top
#101358 - 26/10/04 07:03 AM Re: remote script misinterpretation of colons ":"
tidy_trax Offline
Hoopy frood

Registered: 02/11/03
Posts: 2327
In which case scripters could add an extra char to their scripts, they could even let mIRC do it for them: Edit > Find Text... > Replace "\" with "\\"
_________________________
New username: hixxy

Top
#101359 - 26/10/04 08:49 PM Re: remote script misinterpretation of colons ":"
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
It's hardly as simple as replacing all uses of \ with \\ since it's only in events. Plus it reuires of course that people are actually aware of the change.

Anyway, on *:text:*\:):#:{ } looks a damn sight more confusing than using identifiers IMO.
_________________________
Spelling mistakes, grammatical errors, and stupid comments are intentional.

Top
#101360 - 26/10/04 08:55 PM Re: remote script misinterpretation of colons ":"
tidy_trax Offline
Hoopy frood

Registered: 02/11/03
Posts: 2327
I was talking about \ being an escape character for the whole language, eg: $mycoolidentifier(param1,param2\,,param3)

$1 = param1
$2 = param2,
$3 = param3

I think $chr() looks very messy, whereas \ looks neat, each to their own I suppose.
_________________________
New username: hixxy

Top
#101361 - 27/10/04 05:33 PM Re: remote script misinterpretation of colons ":"
Voice_of_Power Offline
Ameglian cow

Registered: 15/10/03
Posts: 42
Loc: The Netherlands
I'd like that, especially as adding it wouldn't break current scripts (which is important).

Top
#101362 - 27/10/04 08:37 PM Re: remote script misinterpretation of colons ":"
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
How's that?
_________________________
Spelling mistakes, grammatical errors, and stupid comments are intentional.

Top
#101363 - 27/10/04 09:29 PM Re: remote script misinterpretation of colons ":"
Voice_of_Power Offline
Ameglian cow

Registered: 15/10/03
Posts: 42
Loc: The Netherlands
Oh wait... never mind that it would break some things... :rolleyes:

Top
#101364 - 28/10/04 01:06 PM Re: remote script misinterpretation of colons ":"
dr_Eamer Offline
Vogon poet

Registered: 22/08/04
Posts: 101
Loc: Athens, Greece
This is not actually an absolute equivalence! Using an if statement would make your remote look like this:
on *:TEXT:*:*:{
(or something like this anyway - with a '*' for wildmask)
This however would prevent other on text remotes placed under it to run! There are ways through that but some people find it convenient to use a lot of on text events one under the other with different wildmasks, levels or channels.
I agree with starbucks_mafia's suggestions.
_________________________
Maybe I wake up one day to notice that all my life was just a dream!

Top
#101365 - 04/11/04 08:02 AM Re: remote script misinterpretation of colons ":"
Armada Offline
Fjord artisan

Registered: 26/03/04
Posts: 540
Yes so why not place it in a new script? There now the other wildcard on text wont be affected

Top