mIRC Home    About    Download    Register    News    Help

Print Thread
remote script misinterpretation of colons ":" #101348 23/10/04 04:53 AM
Joined: Oct 2004
Posts: 2
A
alkalineX Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
A
Joined: Oct 2004
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.

Re: remote script misinterpretation of colons ":" #101349 23/10/04 04:59 AM
Joined: Nov 2003
Posts: 228
S
Seifer Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Nov 2003
Posts: 228
I don't see that as a bug.

Re: remote script misinterpretation of colons ":" #101350 23/10/04 05:07 AM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Agreed, an escape character would be useful though:

Code:
on *:text:*[color:red]\[/color]:):#:{ }


New username: hixxy
Re: remote script misinterpretation of colons ":" #101351 24/10/04 02:21 AM
Joined: Aug 2004
Posts: 147
N
nalAAlan Offline
Vogon poet
Offline
Vogon poet
N
Joined: Aug 2004
Posts: 147
just do
Code:
if (*:asdf:():* iswm $1-) {

Re: remote script misinterpretation of colons ":" #101352 24/10/04 09:53 AM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.
Re: remote script misinterpretation of colons ":" #101353 25/10/04 04:23 AM
Joined: Aug 2004
Posts: 147
N
nalAAlan Offline
Vogon poet
Offline
Vogon poet
N
Joined: Aug 2004
Posts: 147
its not readable

Re: remote script misinterpretation of colons ":" #101354 25/10/04 08:30 AM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.
Re: remote script misinterpretation of colons ":" #101355 25/10/04 11:15 AM
Joined: Apr 2004
Posts: 841
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 841
($chr though, not $asc)


Saturn, QuakeNet staff
Re: remote script misinterpretation of colons ":" #101356 25/10/04 10:01 PM
Joined: Aug 2004
Posts: 147
N
nalAAlan Offline
Vogon poet
Offline
Vogon poet
N
Joined: Aug 2004
Posts: 147
so can I, but can the author?

Re: remote script misinterpretation of colons ":" #101357 26/10/04 05:57 AM
Joined: Oct 2004
Posts: 2
A
alkalineX Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
A
Joined: Oct 2004
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.

Last edited by alkalineX; 26/10/04 05:58 AM.
Re: remote script misinterpretation of colons ":" #101358 26/10/04 06:03 AM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
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
Re: remote script misinterpretation of colons ":" #101359 26/10/04 07:49 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.
Re: remote script misinterpretation of colons ":" #101360 26/10/04 07:55 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
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
Re: remote script misinterpretation of colons ":" #101361 27/10/04 04:33 PM
Joined: Oct 2003
Posts: 42
V
Voice_of_Power Offline
Ameglian cow
Offline
Ameglian cow
V
Joined: Oct 2003
Posts: 42
I'd like that, especially as adding it wouldn't break current scripts (which is important).

Re: remote script misinterpretation of colons ":" #101362 27/10/04 07:37 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
How's that?


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: remote script misinterpretation of colons ":" #101363 27/10/04 08:29 PM
Joined: Oct 2003
Posts: 42
V
Voice_of_Power Offline
Ameglian cow
Offline
Ameglian cow
V
Joined: Oct 2003
Posts: 42
Oh wait... never mind that it would break some things... :rolleyes:

Re: remote script misinterpretation of colons ":" #101364 28/10/04 12:06 PM
Joined: Aug 2004
Posts: 101
D
dr_Eamer Offline
Vogon poet
Offline
Vogon poet
D
Joined: Aug 2004
Posts: 101
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!
Re: remote script misinterpretation of colons ":" #101365 04/11/04 08:02 AM
Joined: Mar 2004
Posts: 540
A
Armada Offline
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
Yes so why not place it in a new script? There now the other wildcard on text wont be affected