mIRC Home    About    Download    Register    News    Help

Print Thread
Multiple Versions of Similar Scripts #942 10/12/02 07:20 PM
Joined: Dec 2002
Posts: 20
K
KaiN Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Dec 2002
Posts: 20
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.

Re: Multiple Versions of Similar Scripts #943 10/12/02 07:27 PM
Joined: Dec 2002
Posts: 164
M
Merlin Offline
Vogon poet
Offline
Vogon poet
M
Joined: Dec 2002
Posts: 164
Just move the second event into a different remote file - that would fix that "problem" smile


DALnet: #HelpDesk, #mIRC, #MISHScript - Undernet: #mIRC, #mIRC-Scripts
Re: Multiple Versions of Similar Scripts #944 10/12/02 07:34 PM
Joined: Dec 2002
Posts: 20
K
KaiN Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Dec 2002
Posts: 20
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.

Re: Multiple Versions of Similar Scripts #945 12/12/02 04:17 PM
Joined: Dec 2002
Posts: 2,984
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,984
Why not just nest them?

Code:
ON *:TEXT:*:*: {
  test1
  test2
}


Induced IRC
irc.induced.net
Re: Multiple Versions of Similar Scripts #946 12/12/02 08:49 PM
Joined: Dec 2002
Posts: 20
K
KaiN Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Dec 2002
Posts: 20
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.

Re: Multiple Versions of Similar Scripts #947 12/12/02 08:58 PM
Joined: Dec 2002
Posts: 774
T
theRat Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
RTFM

on *:text:*:?: do_privatemsg_stuff
on *:text:*:#: do_channelmsg_stuff
on *:text:*:*: do_msg_stuff


Code:
//if ( khaled isgod ) echo yes | else echo no
Re: Multiple Versions of Similar Scripts #948 12/12/02 10:25 PM
Joined: Dec 2002
Posts: 20
K
KaiN Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Dec 2002
Posts: 20
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.

Re: Multiple Versions of Similar Scripts #949 12/12/02 10:36 PM
Joined: Dec 2002
Posts: 144
D
Dana Offline
Vogon poet
Offline
Vogon poet
D
Joined: Dec 2002
Posts: 144
*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


"Any sufficiently advanced technology is indistinguishable from magic." - Arthur C. Clarke
Re: Multiple Versions of Similar Scripts #950 12/12/02 11:39 PM
Joined: Dec 2002
Posts: 20
K
KaiN Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Dec 2002
Posts: 20
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.

Re: Multiple Versions of Similar Scripts #951 13/12/02 01:59 PM
Joined: Dec 2002
Posts: 5
P
peppie Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
P
Joined: Dec 2002
Posts: 5
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.