mIRC Home    About    Download    Register    News    Help

Print Thread
Matching Text #237547 15/05/12 10:10 PM
Joined: May 2012
Posts: 12
T
TheRandomDog Offline OP
Pikka bird
OP Offline
Pikka bird
T
Joined: May 2012
Posts: 12
I have a question about matching the text up.

I have: on 1:TEXT:test:#channelname:/say Test.

It does not work though when I say it. Assuming that it was because I was trying my own script, I had another chatter say it. It still didn't work.

I'm following the FAQ on the mIRC page and the built-in mIRC Help with the program itself, but it says to do exactly what I'm doing. Help please?

Re: Matching Text [Re: TheRandomDog] #237548 15/05/12 10:29 PM
Joined: Jan 2004
Posts: 1,274
L
Loki12583 Online
Hoopy frood
Online
Hoopy frood
L
Joined: Jan 2004
Posts: 1,274
That should work fine. Note that if you have another text event defined above this one in the same script (and the text matches that one as well), this one will not be reached.

Re: Matching Text [Re: Loki12583] #237549 15/05/12 10:48 PM
Joined: May 2012
Posts: 12
T
TheRandomDog Offline OP
Pikka bird
OP Offline
Pikka bird
T
Joined: May 2012
Posts: 12
According to the script, there is not another one that matches the same word. It's still not working, so I had a question. Does someone else need to say it? Any possible mistakes to keep it from happening? There's not an error message.

Re: Matching Text [Re: TheRandomDog] #237551 16/05/12 01:24 AM
Joined: Jul 2006
Posts: 3,558
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,558
Yes, on text event can be triggered only by someone else, and make sure the user isn't using colors or similar.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Matching Text [Re: Wims] #237569 16/05/12 06:09 PM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
if you have another ON TEXT event anywhere in the script file, regardless of what it's looking for, only the first one will work. By your response, it SOUNDS like you have a 2nd ON TEXT event looking at different match. If that's true, you'd have to combine them into ONE event:

Code:
on *:text:*:#: {
  if ((chan1 == #channel) && (text-to-match1 == text1) { stuff1 }
  if ((chan2 == #channe2) && (text-to-match2 == text2) { stuff2 }
}


Those who fail history are doomed to repeat it
Re: Matching Text [Re: landonsandor] #237570 16/05/12 07:57 PM
Joined: Jan 2004
Posts: 1,274
L
Loki12583 Online
Hoopy frood
Online
Hoopy frood
L
Joined: Jan 2004
Posts: 1,274
Originally Posted By: landonsandor
if you have another ON TEXT event anywhere in the script file, regardless of what it's looking for, only the first one will work.

That's ludicrous. The following works perfectly.

Code:
on *:text:text1:#:stuff1
on *:text:text2:#:stuff2

Re: Matching Text [Re: landonsandor] #237571 16/05/12 09:36 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
Only the first matching event will trigger, but you can have as many different events in the file as you want as long as they either don't overlap or the overlapping is desired.


Invision Support
#Invision on irc.irchighway.net
Re: Matching Text [Re: Riamus2] #237577 18/05/12 12:27 AM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
I stand corrected twice for the same thing. yeah, I certainly miscommunicated there. Thanks for the cleanup


Those who fail history are doomed to repeat it
Re: Matching Text [Re: landonsandor] #237778 02/06/12 05:18 PM
Joined: May 2012
Posts: 12
T
TheRandomDog Offline OP
Pikka bird
OP Offline
Pikka bird
T
Joined: May 2012
Posts: 12
Thanks guys, I figured it out.