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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

ActiveX Control Name<br />

established by IWS. You<br />

can rename this Control.<br />

Use this interface to tie<br />

Properties and Methods to<br />

IWS tags.<br />

To access the ActiveX Control’s Properties and Methods from <strong>VBScript</strong>, you simply type the name of<br />

the Control, followed by a Period “.” and then the Property or Method. You will need to reference<br />

documentation from the developer of the ActiveX Control to determine which properties are setting (Set)<br />

or retrieving (Get), and the functioning of the Methods available. For example, with the Microsoft scroll<br />

bar control, we access Properties using the following code:<br />

MFSC1.Min = 0 ’ Set the min value of the scroll bar to 0<br />

MFSC1.Max = 100 ’ Set the max value of the scroll bar to 100<br />

$LocTag = MFSC1.Value ’ Get the current location of the scroll bar, pass to IWS tag<br />

IWS tools such as Position and Command can be used with ActiveX controls. To enable these tools,<br />

insert the ActiveX control on the Screen and then make sure the ActiveX control is selected<br />

(highlighted). Then, select the Position or Command tool. For example, with the Position tool, you<br />

can control the visibility of the ActiveX Control, or change its location on the screen.<br />

Key Notes:<br />

• All ActiveX Controls must have a unique name<br />

• When referencing an ActiveX object name that has been inserted on a screen, note that<br />

the reference is case-sensitive from <strong>VBScript</strong> <strong>for</strong> IWS 6.1 SP1 or earlier.<br />

• Only ActiveX Properties and Methods can be accessed via <strong>VBScript</strong>. Event handling<br />

must be set-up by configuring the object (i.e. right click on the object)<br />

• ActiveX Controls can only be accessed by <strong>VBScript</strong> interfaces associated with the<br />

Screen which contains the ActiveX Control (i.e. Screen Script, Command Dynamic,<br />

ActiveX Event Handler)<br />

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

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

Saved successfully!

Ooh no, something went wrong!