mIRC Homepage
Posted By: westor [RESOLVED]: ON LOAD - 15/03/11 04:20 PM
Hello,

Check this screenshot and you will understand what i mean.



- Thanks!
Posted By: TRT Re: [BUG]: ON LOAD - 15/03/11 04:31 PM
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.
Posted By: westor Re: [BUG]: ON LOAD - 15/03/11 04:54 PM
ok i did not saw that, but why mirc do this?
the ON LOAD and the ON START are different events !
Posted By: TRT Re: [BUG]: ON LOAD - 15/03/11 05:20 PM
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.
Posted By: RusselB Re: [BUG]: ON LOAD - 15/03/11 08:38 PM
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.
Posted By: Sephiroth_ Re: [RESOLVED]: ON LOAD - 24/04/11 07:42 PM
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 }
}

Posted By: FroggieDaFrog Re: [RESOLVED]: ON LOAD - 25/04/11 05:39 AM
edited: Sephiroth_'s is a smart way than mine
© mIRC Discussion Forums