mIRC Home    About    Download    Register    News    Help

Print Thread
$input suggestion: timeout parameter #138626 04/01/06 02:28 AM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline OP
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.
Re: $input suggestion: timeout parameter #138627 04/01/06 03:22 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
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

Re: $input suggestion: timeout parameter #138628 04/01/06 03:54 AM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline OP
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.
Re: $input suggestion: timeout parameter #138629 11/01/06 11:10 AM
Joined: Apr 2003
Posts: 701
K
Kelder Offline
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...