As far as I can tell, the most likely cause is as follows. It's merely a theory, as most of it happens somewhere deep down in Windows:
- Your script calls /clipboard at first, which makes mIRC put an empty string on the clipboard. mIRC then owns the clipboard at the time that clip.exe is started.
- Clip.exe tries to put new contents on it. It therefore wants ownership of the clipboard. clip.exe queries mIRC about the change of ownership, to let mIRC do any cleanup if it wants to.
- However, mIRC doesn't respond to the query, because your script is keeping mIRC busy. Clip.exe waits a few seconds before it gives up on mIRC, and then grabs clipboard ownership anyway.
The querying and waiting happens at the Windows level*. The delay is five seconds on my system, perhaps it is fifteen on yours. In any case, this has nothing to do with clip.exe. In theory,
mIRC could solve it by giving up ownership of the clipboard when putting an empty string on it.
*) To be exact, the query is a WM_DESTROYCLIPBOARD message, resulting from an EmptyClipboard() call.