mIRC Home    About    Download    Register    News    Help

Print Thread
#230604 15/03/11 04:20 PM
Joined: Dec 2008
Posts: 1,483
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
Hello,

Check this screenshot and you will understand what i mean.



- Thanks!

Last edited by westor; 15/03/11 04:57 PM.
westor #230605 15/03/11 04:31 PM
T
TRT
TRT
T
This behaviour is clearly documented in the help file.

Quote:
The on START event uses the same format, and triggers the first time a script is loaded and every time after that when mIRC is run.

#230606 15/03/11 04:54 PM
Joined: Dec 2008
Posts: 1,483
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
ok i did not saw that, but why mirc do this?
the ON LOAD and the ON START are different events !

westor #230608 15/03/11 05:20 PM
T
TRT
TRT
T
It's always been like that and tbh its just a matter of definition.

Please note that this doesn't lead to reduced functionality, e.g. you could easily script the load event to temporarily disable the start one.

westor #230619 15/03/11 08:38 PM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
The ON START event will trigger every time the script is started. This is triggered when you load a script, since the script has to start when it is loaded.

When you start mIRC, the scripts are already loaded, thus the ON START event triggers, but the ON LOAD event does not.

When you load a new script (usually using File -> Load, or /load -rs <script>) then the ON LOAD event triggers as well as the ON START event.

Joined: Oct 2003
Posts: 214
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 214
A simple workaround to prevent mIRC from triggering the startup event after loading a file for the first time would be:
Code:
on *:load:{
  set %nostartup $true
  stuff
}
on *:start:{
  if (%nostartup) { unset %nostartup }
  else { more stuff }
}



one step closer to world domination
Joined: Apr 2010
Posts: 964
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 964
edited: Sephiroth_'s is a smart way than mine

Last edited by FroggieDaFrog; 25/04/11 05:42 AM.

Link Copied to Clipboard