mIRC Home    About    Download    Register    News    Help

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

G
genius_at_work
genius_at_work
G
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,014
F
Hoopy frood
OP Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,014
In Wscript.Shell, it returns -1 when then box got closed by itsself.

K
Kelder
Kelder
K
Yes, can't really understand why we don't have this already.

The topic came up in this thread too...


Link Copied to Clipboard