18.01.2013 Views

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>InduSoft</strong> <strong>Web</strong> <strong>Studio</strong> <strong>VBScript</strong> <strong>Reference</strong> <strong>Manual</strong><br />

the message box. When adding numbers to create a final value <strong>for</strong> the argument buttons, use<br />

only one number from each group.<br />

Return Value The MsgBox function has the following return values:<br />

Constant Value Button<br />

vbOK 1 OK<br />

vbCancel 2 Cancel<br />

vbAbort 3 Abort<br />

vbRetry 4 Retry<br />

vbIgnore 5 Ignore<br />

vbYes 6 Yes<br />

vbNo 7 No<br />

Remarks When both helpfile and context are provided, the user can press F1 to view the Help topic<br />

corresponding to the context.<br />

If the dialog box displays a Cancel button, pressing the ESC key has the same effect as clicking<br />

Cancel. If the dialog box contains a Help button, context-sensitive Help is provided <strong>for</strong> the dialog<br />

box. However, no value is returned until one of the other buttons is clicked.<br />

When the MsgBox function is used with Microsoft Internet Explorer, the title of any dialog<br />

presented always contains "<strong>VBScript</strong>:" to differentiate it from standard system dialogs.<br />

See Also InputBox<br />

Example Dim MyVar<br />

MyVar = MsgBox ("Hello World!", 65, "MsgBox Example")<br />

' MyVar contains either 1 or 2, depending on which button is clicked.<br />

myResult = MsgBox(“Is this OK?”, vbYesNo Or vbQuestion Or vbApplicationModal, “Delete File”)<br />

Now<br />

Description Returns the current date and time according to the setting of your computer's system date and<br />

time.<br />

Usage dateVal = Now()<br />

Arguments None<br />

Remarks The following example uses the Now function to return the current date and time:<br />

See Also Date, Day, Hour, Month, Minute, Second, Weekday, Year<br />

Example(s) Dim MyVar<br />

MyVar = Now ' MyVar contains the current date and time.<br />

Oct<br />

Description Returns a string representing the octal value of a number<br />

Usage strVal = Oct(number)<br />

Arguments number<br />

The number argument is any valid expression.<br />

Return A String value<br />

Remarks Returns up to 11 characters. If number is not already a whole number, it is rounded to the nearest<br />

whole number be<strong>for</strong>e being evaluated. You can represent octal numbers directly by preceding<br />

numbers in the proper range with &O. For example, &O10 is the octal notation <strong>for</strong> decimal 8.<br />

If number is Hex returns<br />

Null Null<br />

Empty Zero (0)<br />

Any other number Up to 11 octal characters<br />

See Also Hex<br />

Example Dim MyOct MyOct = Oct(4) 'Returns 4.<br />

MyOct = Oct(8) 'Returns 10.<br />

MyOct = Oct(459) 'Returns 713.<br />

<strong>InduSoft</strong>, Ltd. 151

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!