It would be nice to be able to unload a script's timers along with the script itself.

Since "alias -l bar" called from a timer can be seen by the timer only if it's launched from that same script, it appears that mIRC tracks which script each timer was launched from. For example, running the timer from the foo alias can find the bar alias even if I create bar during the 29 seconds after the timer gets launched.

Code:
alias    foo { timer 1 30 bar }
alias -l bar { echo -a $script }


A solution could be some kind of $timer().script property to identify which script the timer was launched from, so they could be unloaded during the ON UNLOAD event, or by the menu choice in the Remotes Editor, possibly in response to an input prompt or a permanent setting like Identifier Warning.

This way you won't spam the server with invalid commands due to unloading a script which had activated a repeating timer executing a command at a short interval.

i.e. something like /unload -rs[N]t script.mrc or /unload -a[N]t aliasfile would cancel all timers launched from that script.

In case a script were unloaded from the alt+R menu, a script's ON UNLOAD event handler could also use $timer().script to loop through the active timers looking for timers from the script being unloaded.

Since there would need to be an indicator whether the script was launched from the Nth remote script, the Nth alias file, from the editbox, or even from a script that's no longer loaded, it would be hard to return N instead of the filename without having a separate .prop for checking if it were launched from an alias file. Perhaps the alias should return the same thing as $script does, with timers launched from the editbox either being $null or $false, and if the script were no longer loaded, either returning the former $script string or $false.