Ask  Ask and quering for reply with a timeout.

Copyright 2009 Roberto Bianchi

Softspecialists - www.softspecialists.com

Introduction

Ask is a console Windows program that will let you to ask and quering for reply with a timeout.

Ask requires at least Windows 2000.

Using Ask

You should start Ask from command prompt or from another program or batch.

Command Line Options

Ask supports the following command-line options:

usage: Ask prompt [/a] [/t:timeout] [/d:default]  [-?] | [-h]

 

prompt

Message to be displayed.

 

/a

Accept any key.

 

/t:timeout

Time to wait in seconds before return the default answer.

 

/d:default

Defaul replay to return when the timeout expires.

 

/?

Displays command-line usage (this help).

 

/h

Displays command-line usage (this help).

     

Return Value

If Ask succeds the return value is the ASCII code of the pressed key.otherwise the return value is zero.

Note

With the /a parameter you can omit the promt text, the program will use a default one: 'Press any key to continue'.
Without the /a parameter you can choose between Y (yes) or N (no) or T (true) or F (false) keys.

Example

ask "Do you want to start the copy? (Y/N)" /t:5 /d:n.