TASKDIALOGNot in LE
Print Topic  Return to Overview  Previous Topic  Next Topic 
Purpose:Display a Windows Vista Task Dialog

 

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

 

buttontypeOne or more of OK, CANCEL, 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 and piping to allow you to enter the redirection characters (<, >, and |) in your prompt text.

 

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.

 

Topic "taskdialog.htm" last edited 4/28/2008. ©2008  JP Software, Inc.
Keywords: TASKDIALOG