mIRC Home    About    Download    Register    News    Help

Print Thread
#186699 25/09/07 01:03 AM
S
Stefan_Leroux
Stefan_Leroux
S
OK, I'm not entirely sure how to put this, but I'm looking for a way to effectively nest a couple fo aliases. Basically I've got a script, which works by opening various different Aliases, with actions including sockopens and restyling the data. The only way I've known how to do it is by having aliases called within each one. The problem is I need to call /msg or /describe from outwith this, but because of the socks it takes time before it works.
I need some way to call an alias, but then not call the next until the first has completed.

Can anyone tell me if theres any way to do this?

#186702 25/09/07 02:00 AM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Originally Posted By: Stefan_Leroux
OK, I'm not entirely sure how to put this, but I'm looking for a way to effectively nest a couple fo aliases. Basically I've got a script, which works by opening various different Aliases, with actions including sockopens and restyling the data. The only way I've known how to do it is by having aliases called within each one. The problem is I need to call /msg or /describe from outwith this, but because of the socks it takes time before it works.
I need some way to call an alias, but then not call the next until the first has completed.

Can anyone tell me if theres any way to do this?


The way I would approach this is add a timer to the next event of x amount of seconds like this

alias myscript {
/blah
/blah
./timer 1 2 /newblah
./timer 1 3 /blah
}

etc..

by calling the next timer 1 time for 2 seconds it should allow enough time then the next timer should follow by an extra second.

#186703 25/09/07 02:24 AM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
If you need to wait until the socket is done, why not just call the next alias from the sockclose event?

Riamus2 #186704 25/09/07 03:32 AM
S
Stefan_Leroux
Stefan_Leroux
S
Well, the best way would be for me to use the timer, but when it gets called it keeps saying in active that it has begun, and ended. It would be the ideal solution if I could stop the started/stopped messages appearing.

I cant call the final alias from the sockclose, because the final alias is not a definite one. I want it to vary between /msg /me /ctcp depending on the command sent, and because of the huge amount of lines in the script, I dont really want to duplicate it just for such subtle differences

#186705 25/09/07 03:37 AM
Joined: Jul 2006
Posts: 107
L
Vogon poet
Offline
Vogon poet
L
Joined: Jul 2006
Posts: 107
You can silence those timer messages by using the "." in front of it.

Code:
 .timerquiet 1 1 echo -s I'm a well-behaved timer!

LonDart #186706 25/09/07 03:52 AM
S
Stefan_Leroux
Stefan_Leroux
S
that will do absolutely perfectly then, thanks mate

- Apparently thats the only thing in this script that I havent used a '.' for. I learned it years ago, and never used a '/' since, although never realised it had a special function until recently

Last edited by Stefan_Leroux; 25/09/07 03:55 AM.
#186719 25/09/07 02:35 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Originally Posted By: Stefan_Leroux
that will do absolutely perfectly then, thanks mate

- Apparently thats the only thing in this script that I havent used a '.' for. I learned it years ago, and never used a '/' since, although never realised it had a special function until recently


Steph, if you notice in my original post I added a . in back of the timer already, you shouldnt of received any messages

Lpfix5 #186727 25/09/07 03:39 PM
S
Stefan_Leroux
Stefan_Leroux
S
Sorry Lpfix5, I never actually noticed that, and because I already had it working via a timer, I didnt copy your code down, so it was my issue. Thanks though, I'll pay much more attention next time


Link Copied to Clipboard