11.07.2015 Views

VBScript Reference Manual for InduSoft Web Studio - ICP DAS

VBScript Reference Manual for InduSoft Web Studio - ICP DAS

VBScript Reference Manual for InduSoft Web Studio - ICP DAS

SHOW MORE
SHOW LESS
  • No tags were found...

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>Command DynamicA Command Dynamic is associated with a specific object on a Screen, and allows one or more actionsto take place when an event occurs with the specific object. A typical use is a button (perhaps arectangle) that is placed on the screen. When an operator selects on the button (via mouse click orpressing a touch screen over the object), this action is expected to initiate some action. That action maybe to set/reset a PLC bit, jump to a different screen, whatever. The Command Dynamic allows thedeveloper to choose what action to take.With Version 6.1, IWS adds new capability to the Command Dynamic interface. In addition to the IWSbuilt-in language command, the Command Dynamic can now execute <strong>VBScript</strong> code. The steps toaccess the <strong>VBScript</strong> interface within a Command Dynamic are:1. Select the object on the Screen currently opened in the IWS workspace. If the object hasa Command Dynamic associated with it, then right click on the object. Otherwise, click onthe Command Dynamic icon (right) from the Mode toolbar and then right click on theobject.2. Now, the Object Properties dialog box <strong>for</strong> theCommand Dynamic will open. Click on the Config…button in the lower right corner of the dialog box.3. Select the event condition (e.g. On Down) whereyour want code to be execute and then select<strong>VBScript</strong> as the Type.4. Enter your <strong>VBScript</strong> code (variable declarationsand executable statements).Within the Command Dynamic, you enter <strong>VBScript</strong>variables and executable statements subject to thefollowing conditions:• Any variable declared in this interface will onlyhave a local scope.• You cannot implement procedures (i.e.Subroutines or Functions) within this interface.Notwithstanding these restrictions, <strong>VBScript</strong> code withina Command Dynamic still has access to all GlobalProcedures.<strong>VBScript</strong> code within the Command Dynamic interface isexecuted whenever one or more of the selected eventconditions (listed in the Command Dynamic configuration screen) occur <strong>for</strong> the selected object. Theexecution of the Command Object script on the Server executes independently from the execution on<strong>Web</strong> Thin Clients.Key Notes:• Be<strong>for</strong>e executing the application, be sure to save (or close) the Screen after any<strong>VBScript</strong> is entered. Otherwise it might not be updated. This is true <strong>for</strong> all <strong>VBScript</strong>interfaces.<strong>InduSoft</strong>, Ltd. 49

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

Saved successfully!

Ooh no, something went wrong!