yelow79, lots of people have such a misconception that on load event will trigger when a script is loaded in a remote. That's not often the case. On occasions mIRC will prompt for initialization of a script, but most of the time it'll require you to load it manually for the onload event to execute. If you copy a simple snippet directly into the remote without a manual load, the load event is useless.
extio, why will you bother with a loop? :/ Do you care to demonstrate to us your idea behind a loop?