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>VBScript</strong> <strong>Reference</strong> <strong>Manual</strong> <strong>InduSoft</strong> <strong>Web</strong> <strong>Studio</strong><br />

Hour<br />

Description Returns a whole number between 0 and 23, inclusive, representing the hour of the day.<br />

Usage intVal = Hour(time)<br />

Arguments time<br />

The time argument is any expression that can represent a time.<br />

Return An integer value between 0 and 23<br />

Remarks A runtime error occurs if time is not a valid time expression. If time contains Null, Null is returned.<br />

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

Example Dim MyTime, MyHour<br />

MyTime = Now<br />

MyHour = Hour(MyTime) ‘Contains the number representing the current hour.<br />

InputBox<br />

Description Displays a dialog box with a custom prompt, waits <strong>for</strong> the user to input text or click a button, and<br />

returns the contents of the text box.<br />

Usage strRet = InputBox(prompt[, title][, default][, xpos][, ypos][, helpfile, context])<br />

Arguments prompt<br />

String expression displayed as the message in the dialog box. The maximum length of<br />

prompt is approximately 1024 characters, depending on the width of the characters used. If<br />

prompt consists of more than one line, you can separate the lines using a carriage return<br />

character (Chr(13)), a linefeed character (Chr(10)), or carriage return–linefeed character<br />

combination (Chr(13) & Chr(10)) between each line.<br />

title<br />

String expression displayed in the title bar of the dialog box. If you omit title, the application<br />

name is placed in the title bar.<br />

default<br />

String expression displayed in the text box as the default response if no other input is<br />

provided. If you omit default, the text box is displayed empty.<br />

xpos<br />

Numeric expression that specifies, in twips, the horizontal distance of the left edge of the<br />

dialog box from the left edge of the screen. If xpos is omitted, the dialog box is horizontally<br />

centered.<br />

ypos<br />

Numeric expression that specifies, in twips, the vertical distance of the upper edge of the<br />

dialog box from the top of the screen. If ypos is omitted, the dialog box is vertically positioned<br />

approximately one-third of the way down the screen.<br />

helpfile<br />

String expression that identifies the Help file to use to provide context-sensitive Help <strong>for</strong> the<br />

dialog box. If helpfile is provided, context must also be provided.<br />

context<br />

Numeric expression that identifies the Help context number assigned by the Help author to<br />

the appropriate Help topic. If context is provided, helpfile must also be provided.<br />

Remarks When both helpfile and context are supplied, a Help button is automatically added to the dialog<br />

box. If the user clicks OK or presses ENTER, the InputBox function returns whatever is in the<br />

text box. If the user clicks Cancel, the function returns a zero-length string ("").<br />

See Also MsgBox<br />

Example Dim myInput<br />

myInput = InputBox("Enter your name")<br />

MsgBox ("You entered: " & myInput)<br />

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

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

Saved successfully!

Ooh no, something went wrong!