Forum Discussion
YMinaev
Staff
14 years agoHi,
I'd rewrite it like below, but you've got the idea:
This is because you probably want to know whether a user pressed OK or Cancel in the dialog. Also, you can set a meaningful default value which you can use as a default server name if the user didn't enter anything.
I'd rewrite it like below, but you've got the idea:
ProjectSuite.Variables.ServerName = BuiltIn.InputBox("Input Data", "Type the server name:", "");
if(ProjectSuite.Variables.ServerName != "")
Log.Message(ProjectSuite.Variables.ServerName);
else
Log.Warning("Nothing entered");
This is because you probably want to know whether a user pressed OK or Cancel in the dialog. Also, you can set a meaningful default value which you can use as a default server name if the user didn't enter anything.