mIRC Home    About    Download    Register    News    Help

Print Thread
#122227 07/06/05 11:36 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
on 1:START: { }

usually mirc needs to close (exit program) and run it again for something that is inside this event to apply...

now i ask can mirc be "cheated" by some alias that will simulate exit ?

so that user doesnt actually exit program for something to take effect ?


IceCapped
#122228 07/06/05 11:47 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
on 1:START: { on.start.alias $1- }
alias on.start.alias { echo ... blah ... }

type in /on.start.alias

#122229 07/06/05 11:54 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
looks what i wanted but im confused...

if you call alias in middle of ON event, how will mirc know it inside ON start and that it should "restart" ?


IceCapped
#122230 08/06/05 12:03 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
looks what i wanted but im confused...

if you call alias in middle of ON event, how will mirc know it inside ON start and that it should "restart" ?


mirc doesnt "restart" when an on start event occurs, its already started, and now it well run your code.

The alias is just what code you want to run.


on *:start:{
echo ... 1 ...
blah
echo ... 2 ...
}

on *:start:{ fred }
alias fred {
echo ... 1 ...
blah
echo ... 2 ...
}

thos two are essentially the same thing, except the second one you can also call /FRED from the command line

Only thing to watch for when you dp thinsg like that, are in other events such as ON TEXT if your using things like $nick, if you call it from the command line $nick holds no value
I get around that by doing this

on *:TEXT:*:#:{ text.event $nick $chan $1- }
alias text.event {
var %nick = $1
var %chan = $2
tokenize 32 $3-
echo -a $time < %nick in %chan > $1-
}

if i call it from a command line (for testing etc) i go
/TEXT.EVENT DaveC #blah my text here

#122231 08/06/05 12:15 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
ahaa !
heh you cant blame me i'm a noob laugh

thanks very very much !!!


IceCapped
#122232 20/06/05 08:59 PM
Joined: Nov 2004
Posts: 12
S
Pikka bird
Offline
Pikka bird
S
Joined: Nov 2004
Posts: 12
Quote:
on 1:START: { }

usually mirc needs to close (exit program) and run it again for something that is inside this event to apply...

now i ask can mirc be "cheated" by some alias that will simulate exit ?

so that user doesnt actually exit program for something to take effect ?


I'm not sure if this is what you are asking, but you can just reload the script with the on start in it and click Yes to running initialization commands. This will also trigger the event.


Link Copied to Clipboard