mIRC Homepage
Posted By: KaiN Multiple Versions of Similar Scripts - 10/12/02 07:20 PM
I think it would be nice if you could use similar scripts at once. Like, if you use:
on *:TEXT:*:*:test
on *:TEXT:*:*:test2

Only the first line will work because it begins with the same type of prefix's. I think it would be nice if you could allow scripts to have multiple occurences using the same prefix's. It would just read them like they're 2 seperate scripts. Like they really are.
Posted By: Merlin Re: Multiple Versions of Similar Scripts - 10/12/02 07:27 PM
Just move the second event into a different remote file - that would fix that "problem" smile
Posted By: KaiN Re: Multiple Versions of Similar Scripts - 10/12/02 07:34 PM
I know that would work, but I think it's a bit un-necessary to have to use seperate files for that. I think it would be much easier if they would just allow you to have more than one script using the same type of format/syntax in the SAME file.
Posted By: Watchdog Re: Multiple Versions of Similar Scripts - 12/12/02 04:17 PM
Why not just nest them?

Code:
ON *:TEXT:*:*: {
  test1
  test2
}
Posted By: KaiN Re: Multiple Versions of Similar Scripts - 12/12/02 08:49 PM
I can't nest these particular scripts that this has all been in reference to. One is Private Message specific, and another isn't. They need to be separate. Good thought though.
Posted By: theRat Re: Multiple Versions of Similar Scripts - 12/12/02 08:58 PM
RTFM

on *:text:*:?: do_privatemsg_stuff
on *:text:*:#: do_channelmsg_stuff
on *:text:*:*: do_msg_stuff
Posted By: KaiN Re: Multiple Versions of Similar Scripts - 12/12/02 10:25 PM
I messed up what I wanted to say in my most recent previous post. I meant to say that one is for a certain type of Private Messages (for an away system that I built), and the other is for ANY Private Messages (the volume script). The problem is that if I put the volume script in the other one, it would only react if the away system was activated by the Private Message, but it only reacts on very specific things, so sometimes the volume script wouldn't react. But it needs to react at all times. I could just write the script to do the volume part in each case, but I don't see that as very efficient, when it takes up more space in the file than is necessary. All I'm asking for is that some sort of volume control be built into the Options menu of mIRC.
Posted By: Dana Re: Multiple Versions of Similar Scripts - 12/12/02 10:36 PM
*hesistates*

I'm not quite sure I understand what you're trying to do, but I don't see there being a problem in trying to nest both of them?

Code:
On *:TEXT:*:?: {
  if ($away) { commands for away system }
  else {
    volume_script
  }
}

If necessary, you can also always include additional if-statements into the if ($away) section.

Dana
Posted By: KaiN Re: Multiple Versions of Similar Scripts - 12/12/02 11:39 PM
First off, it wouldn't work the way I want it to with a simple "else" statement. I want it to react ALL the time, not just under the "else" circumstances.

Second, as I said in my previous post, I could put more if/then statements in there or modify the code to just do the volume thing under each if/then statement already in there, but that would be a waste of space in the file and un-necessary if all they have to do is add a simple volume control dialog or option into the mIRC Options dialog.
Posted By: peppie Re: Multiple Versions of Similar Scripts - 13/12/02 01:59 PM
I agree it would be nice if you could just put two of the same events in 1 file. The problem is, some scripts actually depend on this behaviour, to change it now would mean a lot of scripts would break.
© mIRC Discussion Forums