Take Command / TCC Help v. 13.04
TASKDIALOGNot in LE
Hide Navigation Pane
TASKDIALOGNot in LE
Previous topic Next topic No directory for this topic No expanding text in this topic  
TASKDIALOGNot in LE
Previous topic Next topic Topic directory requires JavaScript JavaScript is required for expanding text JavaScript is required for the print function Mail us feedback on this topic!  

Comments (...)

Purpose:Display a Windows Task Dialog.

 

Format:TASKDIALOG [/I /S /W] buttontype "title" "instruction" [text]

 

buttontypeOne or more of OK, YES, NO, RETRY, CANCEL, and/or CLOSE
titleText for the task dialog title
instructionText for the main instruction
textOptional additional text that appears below the main instruction, in a smaller font

 

/I(nformation icon)/W(arning icon)
/S(top icon)

 

See also: INKEY, INPUT, MSGBOX and QUERYBOX.

 

Usage:

 

TASKDIALOG requires Windows Vista or later.

 

The button the user chooses is indicated using the internal variable %_?. Be sure to save the return value in another variable or test it immediately; because the value of %_? changes with every internal command. The following list shows the value returned for each button:

 

response

%_?

Yes or OK

10

No

11

Cancel or Close

12

Retry

13

 

If there is an error in the TASKDIALOG command itself, %_? will be set to 2.

 

For example, to display a Yes / No message box and take action depending on the result, you could use commands like this:

 

taskdialog yes no "Copy" "Copy all files to A:?"

if %_? == 10 copy * a:

 

Since TASKDIALOG doesn't write to standard output, it disables redirection allow you to enter the redirection characters (< and >) in your prompt text.  If you want to use pipe characters or command separators, you will need to escape or quote them.

 

TASKDIALOG creates a popup dialog box. If you prefer to retrieve input from the command line, see the INKEY and INPUT commands.

 

Options:

 

/IDisplay an icon consisting of a lower case "i" in a circle in the message box.

 

/SDisplay a stop sign icon in the message box.

 

/WDisplay an exclamation point icon in the message box.

 

Comments (...)