MessageBox
Top  Previous  Next


Displays a message dialog



Tip: use the InputBox function to display an input box where user can enter a string

Category
General

Script section
All

MessageBox Text [,Ask]

Text

Text to display  
 
Notice: If text contains commas you must put it inside quotes ("Trust, but verify").  
This goes for text in variables too - if a variable contains text with commas the variable name must be put inside quotes ("%MyVar%").  

Ask

If the "Ask" switch is present, two buttons will be displayed ("No" & "Yes") instead of one ("OK"). If the user clicks "Yes", the variable %LastMessageBox% will be set to "yes", otherwise it will be set to "no"  

Examples
1) Show the contents of %col1% (inside a data.loop statement)

MessageBox %col1%

2) Display a message

MessageBox Hello!

3) Ask something

MessageBox Copy the file?, Ask
IF %LastMessageBox%=Yes THEN
 DOS copy c:\myfile.txt c:\myfile.bck
ENDIF