I did this because I use an external program in which to write my scripts. I like the feature that mIRC already has to "Monitor File Changes", but I got annoyed with the consistent "Would you like to initilize this script?" pop-up that came up every time I saved my file. After some suggestions on how to go about this, this is what I've created.
I hope it works as well for you as it does for me. :)
NOTE: If there are any bugs, please feel free to let me know.
on *:start:{
scriptReload
.timer 0 10 scriptReload
}
alias scriptReload {
var %i = $script(0)
if !$hget(scriptReloader) {
while %i {
hadd -m scriptReloader %i $md5($script(%i),2)
dec %i
}
continue
}
else {
while %i {
var %oldHash = $hget(scriptReloader,%i), %newHash = $md5($script(%i),2), %script = $script(%i)
if %oldHash != %newHash {
.timer 1 0 .reload -rs $qt(%script)
hadd -m scriptReloader %i %newHash
}
dec %i
}
}
}