mIRC Home    About    Download    Register    News    Help

Print Thread
Nested Alias #186699 25/09/07 01:03 AM
Joined: Jun 2003
Posts: 17
S
Stefan_Leroux Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jun 2003
Posts: 17
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?


Swift as the Wind
Silent as a Forest
Fierce as Fire
Immovable as a Mountain
Re: Nested Alias [Re: Stefan_Leroux] #186702 25/09/07 02:00 AM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline
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.


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Re: Nested Alias [Re: Stefan_Leroux] #186703 25/09/07 02:24 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
If you need to wait until the socket is done, why not just call the next alias from the sockclose event?


Invision Support
#Invision on irc.irchighway.net
Re: Nested Alias [Re: Riamus2] #186704 25/09/07 03:32 AM
Joined: Jun 2003
Posts: 17
S
Stefan_Leroux Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jun 2003
Posts: 17
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


Swift as the Wind
Silent as a Forest
Fierce as Fire
Immovable as a Mountain
Re: Nested Alias [Re: Stefan_Leroux] #186705 25/09/07 03:37 AM
Joined: Jul 2006
Posts: 107
L
LonDart Offline
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
Re: Nested Alias [Re: LonDart] #186706 25/09/07 03:52 AM
Joined: Jun 2003
Posts: 17
S
Stefan_Leroux Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jun 2003
Posts: 17
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.

Swift as the Wind
Silent as a Forest
Fierce as Fire
Immovable as a Mountain
Re: Nested Alias [Re: Stefan_Leroux] #186719 25/09/07 02:35 PM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline
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


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Re: Nested Alias [Re: Lpfix5] #186727 25/09/07 03:39 PM
Joined: Jun 2003
Posts: 17
S
Stefan_Leroux Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jun 2003
Posts: 17
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


Swift as the Wind
Silent as a Forest
Fierce as Fire
Immovable as a Mountain