|
#1
|
|||
|
|||
Return value of InputBox
I am curious... if you present an inputbox in a vbscript to the user, how do you determine if the Cancel button of the inputbox was clicked?
I would like to abort the build process if the Cancel button is clicked on the inputbox. Perhaps there is a better method? dim sTemp dim objMacro sTemp = InputBox("Do you want to transmit ActiveX32 to the FTP site?","Transmit File","NO") Set objMacro = vbld_TempMacros.Add("FTPActivex", sTemp) Any help is appreciated. |
#2
|
|||
|
|||
I would probably use the Shell Popup method for that, or check for an empty string returned from InputBox. See the Prompt.bld sample.
http://kinook.com/VisBuildPro/Manual/promptsample.htm |
#3
|
|||
|
|||
Quote:
I already define a default value for the inputbox, so the script can deal with yes or no answers, but if the cancel is clicked I want to abort the project build. Is this possible? |
#4
|
|||
|
|||
It will return an empty string if canceled.
http://www.w3schools.com/vbscript/func_inputbox.asp To fail the build from script code, use Step.BuildStatus = vbldStepStatFailed |
#5
|
|||
|
|||
Quote:
|
|
|