mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2004
Posts: 2,019
Hoopy frood
OP Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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.


Gone.
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
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

Joined: Feb 2004
Posts: 2,019
Hoopy frood
OP Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
In Wscript.Shell, it returns -1 when then box got closed by itsself.


Gone.
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Yes, can't really understand why we don't have this already.

The topic came up in this thread too...


Link Copied to Clipboard