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 />

Notwithstanding these restrictions, <strong>VBScript</strong> code within the<br />

ActiveX Event interface still has access to all Global<br />

Procedures, as well as any procedures in the Screen Script<br />

<strong>for</strong> the same Screen where the ActiveX object is configured.<br />

<strong>VBScript</strong> code within the ActiveX Event interface is executed whenever one or more of the selected<br />

Event conditions (listed in the Configuration dialog box) occur <strong>for</strong> the selected ActiveX object. The<br />

execution of the script on the Server executes independently from the execution on <strong>Web</strong> Thin Clients.<br />

Key Notes:<br />

• Be<strong>for</strong>e executing the application, be sure to save (or close) the Screen<br />

after any <strong>VBScript</strong> is entered. Otherwise it might not be updated. This is<br />

true <strong>for</strong> all <strong>VBScript</strong> interfaces.<br />

Background Task Startup Script<br />

In the Tasks Worksheet folder is the Script subfolder which<br />

will contain a default Startup Script icon and any<br />

Background Task Script Groups declared. To edit the<br />

Background Task Startup Script:<br />

1. Click on the Tasks Worksheet folder<br />

2. Click on the Script subfolder.<br />

Any <strong>VBScript</strong> code placed in this interface will execute when<br />

the Background Task module is started, which occurs when<br />

the IWS application is started. This code will only execute<br />

once, and is meant <strong>for</strong> initialization purposes.<br />

Variables and Procedures declared in the Background Task<br />

Startup Script are available to the Background Task Script Group, but are not available to any <strong>VBScript</strong><br />

interfaces in the Graphic Module. Remember that the Background Task Group Startup Script can<br />

access the procedures declared in Global Procedures.<br />

Since the Background Task Startup Script has no interaction with a Graphics script, the only Server<br />

display I/O functions that can be implemented are MsgBox and InputBox functions.<br />

Since the Background Task Startup Script runs on the IWS Server, there is no effect with <strong>Web</strong> Thin<br />

Clients.<br />

Background Task Script Groups<br />

The Background Task Script Groups consist of one or more <strong>VBScript</strong> interface groups that run in the<br />

Background Task. By default, there are no Background Task Script Groups unless added by the<br />

developer. These Script Groups will execute in a background as long as their Execution Field is in a<br />

TRUE state.<br />

Background Task Script Groups have the following limitations:<br />

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

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

Saved successfully!

Ooh no, something went wrong!