create a question-Box
question=id=[messageid]<tab>text=[text]<tab>yes=[yes-call]<tab>no=[no-call]
old syntax:
question=Question=<gotoyes>=<gotono>=[<default 1/2>]
Tab-Separated Syntax
Parameter
title |
Title |
text |
Text to display |
id |
Message-ID (needed for translation) |
yes |
goto-Position for Yes |
no |
goto-Position for no or "cancel" to cancel the script |
topic |
set topic to help |
button1/2 |
set text for Button1 or 2 |
buttoncommand1/2 |
set command for Button1 or 2 |
yestext |
text for Button "OK"/"YES" |
notext |
text for Button "Cancel" |
More information see "message"
question=id=mymes3945<tab>text=Start the Procress?<tab>no=cancel
// follow script is only executing, if user click on "yes"
question=id=mymes3945<tab>text=choose color. yes for red, no for blue<tab>yes=gotored<tab>no=gotoblue
[gotored]
messagebox=color is red
return
[gotoblue]
messagebox=color is blue
return
Question with specified text and a return-value-depending goto.
If the goto starts with a !: direct execution as a command. Separation mark in this command is not "=" but "-".
If there is no goto: source code processes with the next line.
If default = 2: No is default
Expample
// Question quit program, default="No"
question=Do you want to quit?=quitprogram=continueprogram=2
// Goto quitprogram = Quit
// Goto continueprogram
[continueprogram]
messagebox=Program continues ....
return true
[quitprogram]
return false
Shorter:
question=Do you want to quit?=return false
// program continues if users clicks "Yes"
With message number text:
question=m4324$Do you want to quit?=return false
// program continues if users clicks "Yes"
If you want to delete the default could be:
question=Do you want to delete?=ende=cancel
// Goto end = Batch ends with "OK", deleting process continues
// Goto cancel = Batch ends with "Error", deleting process stops
Example for function call:
question=Do you want to call myUserfunction?=myUserfunction
return
end
funktion myUserfunction
messagebox=myUserfunction was called
end
see