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

• Variables declared in a Background Task Script Group have a local scope <strong>for</strong> its specific Script<br />

Group only. Variables cannot be shared with other Script Groups, nor any other <strong>VBScript</strong><br />

Interface.<br />

• Background Task Script Groups cannot declare their own Procedures (Subroutines and<br />

Functions).<br />

• The Execution Field of the Script Group will only support IWS tags or built-in functions. No<br />

support <strong>for</strong> <strong>VBScript</strong> variables or Procedures is provided in the Execution Field.<br />

However, the Background Task Script Groups can do the following:<br />

• Access Procedures and Variables within the Background Task Startup Script.<br />

• Access Procedures declared in Global Procedures.<br />

To create a new Script Group, right-click on the Script<br />

subfolder in the Tasks tab of the Workspace. Select the<br />

Insert option from the pop-up menu. Note that the Startup<br />

Script is already defined. To open (edit) an existing Script<br />

Group, simply click its icon in the Script subfolder of the<br />

Tasks workspace tab.<br />

The code configured in each Script Group is executed by<br />

the Background Task. IWS scans the Script Groups<br />

sequentially (based on the number of the group) and<br />

executes only the Groups in which the condition configured<br />

in the Execution Field of the Script Group is set to or is<br />

evaluated to be TRUE (a value different from 0).<br />

When any Script Group is saved during runtime (e.g. from an on-line configuration download), the<br />

Startup Script interface will be executed again, and the current value of the local variables contained in<br />

any Script Group will be reset, if any exist.<br />

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

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

Saved successfully!

Ooh no, something went wrong!