mIRC Home    About    Download    Register    News    Help

Print Thread
#237547 15/05/12 10:10 PM
Joined: May 2012
Posts: 12
T
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?

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
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.

Loki12583 #237549 15/05/12 10:48 PM
Joined: May 2012
Posts: 12
T
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.

Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
Yes, on text event can be triggered only by someone else, and make sure the user isn't using colors or similar.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #237569 16/05/12 06:09 PM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
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
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
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

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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
Riamus2 #237577 18/05/12 12:27 AM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
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
Joined: May 2012
Posts: 12
T
Pikka bird
OP Offline
Pikka bird
T
Joined: May 2012
Posts: 12
Thanks guys, I figured it out.


Link Copied to Clipboard