mIRC Homepage
Posted By: FiberOPtics $input suggestion: timeout parameter - 04/01/06 02:28 AM
Imo it would be convenient if $input would take a parameter where we could specify the amount of seconds until the $input dialog should close itsself.

In other words, if I specify 10, it should close after 10 seconds if the user hasn't closed it itsself.

This is possible with Wscript.Shell's popup method in VBscript, but doesn't seem to work with mIRC's current COM implementation. I can get everything to work fine except for the timeout parameter with both the regular COM method, and the COM method to execute VBscript. When I use the very same VBscript code, and use it with the MSScriptcontrol object to interpret VBScript, it still will do everything except for the timeout parameter, so this is surely some kind of problem with mIRC not letting this window be destroyed at timeout.
Sounds like a good idea to me. Maybe there could be a special value returned if the $input timed out.. like $timeout or $expire.

var %i = $input(blah..blah,10)
if (%i == $timeout) {
echo 4 -a Oh noes, you took too long!
return
}

-genius_at_work
Posted By: FiberOPtics Re: $input suggestion: timeout parameter - 04/01/06 03:54 AM
In Wscript.Shell, it returns -1 when then box got closed by itsself.
Posted By: Kelder Re: $input suggestion: timeout parameter - 11/01/06 11:10 AM
Yes, can't really understand why we don't have this already.

The topic came up in this thread too...
© mIRC Discussion Forums