26 May 2013, 16:28 | #1 |
Registered User
Join Date: Aug 2012
Location: Australia
Posts: 651
|
ask like command with timeout (and default option)
Hi,
anyone seen a command like "ask" I can use in shell scripts that lets me answer yes/no like ask but times out without user input to a default. (yes or no)? I saw some website that that says ask takes a timeout option... but it doesn't. |
26 May 2013, 17:08 | #2 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,985
|
Unfortunately it is not possible to time out a Read() request from a CON window. This means any program which takes editable input cannot time out. But a program can temporarily switch the window into RAW mode and wait for a single key press.
Here is an example: http://thomas-rapp.homepage.t-online...aitForChar.lha |
27 May 2013, 14:30 | #3 | |
Registered User
Join Date: Aug 2012
Location: Australia
Posts: 651
|
Quote:
Btw.. the failat and if warn just use the return code from main do they ? (0 - Ok, 5 - Warn, 10 - Error, 20 - Fail) |
|
27 May 2013, 18:00 | #4 | |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,985
|
Quote:
If a program returns -1, you get a "unknown command" message although the command was executed. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cnet.device dma timeout getting hardware station address | voyager | support.Hardware | 1 | 21 June 2013 14:21 |
Server timeout issue | andreas | project.EAB | 11 | 23 June 2011 04:49 |
Default Tools | Yoto | support.Apps | 3 | 25 February 2009 15:00 |
Default draw | Retro1234 | support.Other | 1 | 02 July 2006 17:14 |
500 Gateway Timeout error. | Amiga1992 | project.EAB | 3 | 04 December 2001 22:41 |
|
|