Using Vbscript with Indusoft Web Studio

Total Page:16

File Type:pdf, Size:1020Kb

Using Vbscript with Indusoft Web Studio Using VBScript with InduSoft Web Studio © InduSoft 2006 Table of Contents About VBScript..............................................................................................................................................4 VBScript Limitations in IWS.........................................................................................................................6 The Microsoft Visual Basic Family...............................................................................................................6 Differences between VBScript and VBA ......................................................................................................7 VBScript Hosting Environments ...................................................................................................................8 VBScript Language Overview .......................................................................................................................9 VBScript Functionality ..............................................................................................................................9 VBScript Elements.....................................................................................................................................9 Variable Data Types and Subtypes ..........................................................................................................10 Data Subtype Identification......................................................................................................................10 Data Subtype Conversion.........................................................................................................................10 Variable Naming Rules & Conventions...................................................................................................11 Variable Scope .........................................................................................................................................11 VBScript Constants..................................................................................................................................11 Declaring VBScript Variables and Constants..........................................................................................12 VBScript Keywords .................................................................................................................................12 Operators..................................................................................................................................................12 Operator Precedence ................................................................................................................................13 Functions..................................................................................................................................................13 Statements ................................................................................................................................................16 Objects and Classes......................................................................................................................................19 VBScript Object Commands....................................................................................................................21 VBScript User-Defined Class Objects.....................................................................................................22 VBScript Objects and Collections ...........................................................................................................26 Err Object.............................................................................................................................................27 Scripting Dictionary Object .................................................................................................................28 Scripting FileSystemObject .................................................................................................................29 COM Objects and Collections .................................................................................................................36 VBScript Configuration and Operation in IWS...........................................................................................40 Global Procedures ....................................................................................................................................41 Graphics Script.........................................................................................................................................42 Screen Scripts...........................................................................................................................................43 Command Dynamic .................................................................................................................................45 ActiveX Events ........................................................................................................................................46 Background Task Startup Script ..............................................................................................................47 Background Task Script Groups ..............................................................................................................47 Scope of VBScript Procedures and Variables..........................................................................................49 Accessing IWS Tags and IWS Built-in functions....................................................................................50 Accessing ActiveX Objects from VBScript.............................................................................................53 IntelliSense...............................................................................................................................................54 IntelliSense...............................................................................................................................................55 VBScript with Web Thin Clients.............................................................................................................57 VBScript Language Reference.....................................................................................................................58 VBScript Variables ..................................................................................................................................59 Variable Data Types and Subtypes ......................................................................................................59 Array Variables ....................................................................................................................................61 Boolean Variables ................................................................................................................................63 2 Byte, Integer & Long Variables...........................................................................................................64 Currency Variables ..............................................................................................................................64 Date (and Time) Variables...................................................................................................................65 Empty Variables...................................................................................................................................67 Error Variables.....................................................................................................................................67 Null Variables ......................................................................................................................................67 Object Variables...................................................................................................................................68 Real (Single, Double) Variables ..........................................................................................................68 Strings Variables .................................................................................................................................69 Data Subtype Identification..................................................................................................................71 Data Subtype Conversion.....................................................................................................................73 Data Subtype Conversion.....................................................................................................................74 VBScript Naming Rules and Conventions...........................................................................................74 VBScript Naming Rules and Conventions...........................................................................................75 Variable Scope .....................................................................................................................................76 VBScript Constants..................................................................................................................................78 Explicit Constants ................................................................................................................................78 Implicit Constants ................................................................................................................................79
Recommended publications
  • Adobe Introduction to Scripting
    ADOBE® INTRODUCTION TO SCRIPTING © Copyright 2007 Adobe Systems Incorporated. All rights reserved. Adobe® Introduction to Scripting NOTICE: All information contained herein is the property of Adobe Systems Incorporated. No part of this publication (whether in hardcopy or electronic form) may be reproduced or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written consent of Adobe Systems Incorporated. The software described in this document is furnished under license and may only be used or copied in accordance with the terms of such license. This publication and the information herein is furnished AS IS, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies, makes no warranty of any kind (express, implied, or statutory) with respect to this publication, and expressly disclaims any and all warranties of merchantability, fitness for particular purposes, and non-infringement of third-party rights. Any references to company names in sample templates are for demonstration purposes only and are not intended to refer to any actual organization. Adobe®, the Adobe logo, Illustrator®, InDesign®, and Photoshop® are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries. Apple®, Mac OS®, and Macintosh® are trademarks of Apple Computer, Inc., registered in the United States and other countries. Microsoft®, and Windows® are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries. JavaScriptTM and all Java-related marks are trademarks or registered trademarks of Sun Microsystems, Inc.
    [Show full text]
  • Scala Infochannel Player Setup Guide
    SETUP GUIDE P/N: D40E04-01 Copyright © 1993-2002 Scala, Inc. All rights reserved. No part of this publication, nor any parts of this package, may be copied or distributed, transmitted, transcribed, recorded, photocopied, stored in a retrieval system, or translated into any human or computer language, in any form or by any means, electronic, mechanical, magnetic, manual, or otherwise, or disclosed to third parties without the prior written permission of Scala Incorporated. TRADEMARKS Scala, the exclamation point logo, and InfoChannel are registered trademarks of Scala, Inc. All other trademarks or registered trademarks are the sole property of their respective companies. The following are trademarks or registered trademarks of the companies listed, in the United States and other countries: Microsoft, MS-DOS, Windows, Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, DirectX, DirectDraw, DirectSound, ActiveX, ActiveMovie, Internet Explorer, Outlook Express: Microsoft Corporation IBM, IBM-PC: International Business Machines Corporation Intel, Pentium, Indeo: Intel Corporation Adobe, the Adobe logo, Adobe Type Manager, Acrobat, ATM, PostScript: Adobe Systems Incorporated TrueType, QuickTime, Macintosh: Apple Computer, Incorporated Agfa: Agfa-Gevaert AG, Agfa Division, Bayer Corporation “Segoe” is a trademark of Agfa Monotype Corporation. “Flash” and “Folio” are trademarks of Bauer Types S.A. Some parts are derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm. JPEG file handling is based in part on the work of the Independent JPEG Group. Lexsaurus Speller Technology Copyright © 1992, 1997 by Lexsaurus Software Inc. All rights reserved. TIFF-LZW and/or GIF-LZW: Licensed under Unisys Corporation US Patent No. 4,558,302; End-User use restricted to use on only a single personal computer or workstation which is not used as a server.
    [Show full text]
  • What Is Activex: What Does Activex Do? Benefits of Activex
    Khalil Rehman December 2, 2003 What is ActiveX: Microsoft® ActiveX™ is a set of technologies from Microsoft that enables interactive content for the World Wide Web. With ActiveX, Web sites come alive with multimedia effects, interactive objects, and sophisticated applications that create a user experience comparable to that of high-quality CD-ROM titles. ActiveX provides the glue that ties together a wide assortment of technology building blocks to enable these "active" Web sites. (Microsoft Corporation, July 1996) What does ActiveX do? It is designed to increase the dynamic designs of a website. The controls are components that can easily be inserted into a Web page or other application to reuse packaged functionality someone else has programmed. Benefits of ActiveX Some benefits of ActiveX are, • Active web content which attracts the user and retain their interest in the web pages. • Open cross platform support on Macintosh, Windows and Unix operating systems • The tools in which programmer wants to build ActiveX controls are very common and familiar like Visual Basic, Visual C++®, Borland Delphi, Borland C++, Java™, and Java-enabled tools • Existing inventory of ActiveX controls available today for immediate use by Web producers ActiveX VS Java ActiveX is a Microsoft platform dependent and works on window based machine and only work in the internet explorer browser. Once ActiveX controls install and run on the machine it doesn’t need to install and run again, saving the download time after first use. Java has been developed to work on any kind of machine and operating system and do not need of any kind of plug-in.
    [Show full text]
  • Activex Controls and Plugins
    ePM Desktop Requirements Checklist Summary Hardware Intel® Pentium® III 933 MHz or higher (Recommended) Minimum Intel® Pentium® II 300 MHz 512 MB RAM or higher High Speed Internet Connection (Recommend 1 Mbps or greater) 1 GB Storage Desktop Software Microsoft Windows® XP Service Pack 2 Microsoft® Internet Explorer 6.01 or Microsoft® Internet Explorer 7.0 Acrobat Reader Project Document Manager Client Data Dynamics Active Reports Viewer Sun Java 2 Runtime (1.4.2) Microsoft .NET Framework Version 1.1 Redistributable Package Microsoft .NET Framework 3.5 Service Pack 1 Microsoft® Office 2003 or Office 2007 Professional Edition Microsoft Office 2003 / or 2007 Redistributable Primary Interop Assemblies Redistributable Primary Interop Assemblies* Microsoft Web Services Enhancements 2.0 Service Pack 3* Visual Studio 2005 Tools for Office Second Addition Runtime (VSTOR)* Required if using the ePM Office Business Applications or Desktop Quick Applications Administrative Rights Note: you must have administrative rights to your desk top computer or be able to perform the following: Open the following registries o HKEY_CLASSES_ROOT\PDM o HKEY_CLASSES_ROOT\LMC Desktop Requirements Page 1 ePM Desktop Requirements Internet Explorer Settings The following settings are required in Internet Explorer. The instructions below assume IE 7. If you are using another version of IE or another browser, please set accordingly. ePM set in trusted sites zone 1. In Internet Explorer, choose Tools > Internet Options. The Internet Options dialog box appears. 2. Click the Security tab. 3. Select Trusted Sites > Sites. The Trusted Sites dialog box appears. 4. Under Add this Web site to the zone, type https://epm.pbs.gsa.gov 5.
    [Show full text]
  • Using the Component Object Model Interface
    MQSeries for Windows NT V5R1 IBM Using the Component Object Model Interface SC34-5387-01 MQSeries for Windows NT V5R1 IBM Using the Component Object Model Interface SC34-5387-01 Note! Before using this information and the product it supports, be sure to read the general information under Appendix B, “Notices” on page 151. Second edition (April 1999) This edition applies to MQSeries for Windows NT V5.1 and to any subsequent releases and modifications until otherwise indicated in new editions. Copyright International Business Machines Corporation 1997,1999. All rights reserved. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Contents About this book ..................................... v Who this book is for ................................... v MQSeries publications . vi MQSeries cross-platform publications ....................... vi MQSeries platform-specific publications ...................... ix MQSeries Level 1 product publications ....................... x Softcopy books . x MQSeries information available on the Internet .................. xii Where to find more information about ActiveX ................... xii Summary of changes ................................. xiii Changes for this edition ................................ xiii Chapter 1. Introduction . 1 MQSeries Automation Classes for ActiveX overview ................ 1 Chapter 2. Designing and programming using MQSeries Automation Classes for ActiveX .................................. 3 Designing
    [Show full text]
  • Getting Started with Windows Scripting
    Getting Started with Windows Scripting art I of the PowerShell, VBScript, and JScript Bible intro- IN THIS PART duces you to the powerful administrative tool that is Windows scripting. You’ll get an overview of Windows Chapter 1 P Introducing Windows Scripting scripting and its potential, and an introduction to three tech- nologies you can use for Windows scripting: VBScript, JScript, Chapter 2 and PowerShell. VBScript Essentials Chapter 3 JScript Essentials Chapter 4 PowerShell Fundamentals COPYRIGHTED MATERIAL 886804c01.indd6804c01.indd 1 11/21/09/21/09 11:16:17:16:17 PPMM 86804c01.indd 2 1/21/09 1:16:18 PM Introducing Windows Scripting indows scripting gives everyday users and administrators the ability to automate repetitive tasks, complete activities while IN THIS CHAPTER away from the computer, and perform many other time-saving W Introducing Windows scripting activities. Windows scripting accomplishes all of this by enabling you to create tools to automate tasks that would otherwise be handled manually, Why script Windows? such as creating user accounts, generating log files, managing print queues, or examining system information. By eliminating manual processes, you Getting to know can double, triple, or even quadruple your productivity and become more Windows Script Host effective and efficient at your job. Best of all, scripts are easy to create and Understanding the Windows you can rapidly develop prototypes of applications, procedures, and utili- scripting architecture ties; and then enhance these prototypes to get exactly what you need, or just throw them away and begin again. This ease of use gives you the flex- ibility to create the kinds of tools you need without a lot of fuss.
    [Show full text]
  • SAEAUT SNMP OPC Server Supports Jscript (PDF)
    SAEAUT SNMP OPC Server supports JScript (Windows SAE – Automation, s.r.o. Nová Dubnica Solid And Effective partner at development Scripting) of your products and industry automation SAEAUT SNMP OPC Server support Windows Scripting - JScript. The purpose of the article is to introduce and give useful recommendations how to use the SAEAUT SNMP OPC Server for processing of SNMP data utilizing standard Windows Scripting - JScript. Introduction In typical SNMP usage, there are a number of systems to be managed, and one or more systems managing them (see below in the Figure 1). A software component called an agent runs on each managed system and reports information via SNMP to the managing systems. Data contained in the agent database depends on the specific function of the devices. Description of these data is made via standard called MIB (Management Information Bases). The company SAE–Automation, Ltd. has brought on the market very powerful management system called SAEAUT SNMP OPC Server and popularity of this management system is each day increasing. Management System Managed Element s e SNMP manager P SNMP agent SNMP manager g SNMP agent a Human M s N Network s S Manager e M Management Management Managed Objects database s database e P g a A s R s T e M Figure 1: The SNMP communication between SNMP manger and SNMP agents. 1 http://www.saeautom.sk, [email protected], tell.:+421-(0)42-445 07 01, fax: +421-(0)42-445 07 02, Address: Trenčiianská 19, 018 51 Nová Dubniica, Sllovakiia Finally, this document should perform as a user guide which will introduce the basic SNMP terms (manager, agent, MIB, Trap, etc.) and show you step-by-step, how to use the SAEAUT SNMP OPC Server which acts as SNMP manager for processing of SNMP data utilizing standard Windows Scripting - JScript.
    [Show full text]
  • Presentation on Ocaml Internals
    OCaml Internals Implementation of an ML descendant Theophile Ranquet Ecole Pour l’Informatique et les Techniques Avancées SRS 2014 [email protected] November 14, 2013 2 of 113 Table of Contents Variants and subtyping System F Variants Type oddities worth noting Polymorphic variants Cyclic types Subtyping Weak types Implementation details α ! β Compilers Functional programming Values Why functional programming ? Allocation and garbage Combinatory logic : SKI collection The Curry-Howard Compiling correspondence Type inference OCaml and recursion 3 of 113 Variants A tagged union (also called variant, disjoint union, sum type, or algebraic data type) holds a value which may be one of several types, but only one at a time. This is very similar to the logical disjunction, in intuitionistic logic (by the Curry-Howard correspondance). 4 of 113 Variants are very convenient to represent data structures, and implement algorithms on these : 1 d a t a t y p e tree= Leaf 2 | Node of(int ∗ t r e e ∗ t r e e) 3 4 Node(5, Node(1,Leaf,Leaf), Node(3, Leaf, Node(4, Leaf, Leaf))) 5 1 3 4 1 fun countNodes(Leaf)=0 2 | countNodes(Node(int,left,right)) = 3 1 + countNodes(left)+ countNodes(right) 5 of 113 1 t y p e basic_color= 2 | Black| Red| Green| Yellow 3 | Blue| Magenta| Cyan| White 4 t y p e weight= Regular| Bold 5 t y p e color= 6 | Basic of basic_color ∗ w e i g h t 7 | RGB of int ∗ i n t ∗ i n t 8 | Gray of int 9 1 l e t color_to_int= function 2 | Basic(basic_color,weight) −> 3 l e t base= match weight with Bold −> 8 | Regular −> 0 in 4 base+ basic_color_to_int basic_color 5 | RGB(r,g,b) −> 16 +b+g ∗ 6 +r ∗ 36 6 | Grayi −> 232 +i 7 6 of 113 The limit of variants Say we want to handle a color representation with an alpha channel, but just for color_to_int (this implies we do not want to redefine our color type, this would be a hassle elsewhere).
    [Show full text]
  • Case Study: Internet Explorer 1994..1997
    Case Study: Internet Explorer 1994..1997 Ben Slivka General Manager Windows UI [email protected] Internet Explorer Chronology 8/94 IE effort begins 12/94 License Spyglass Mosaic source code 7/95 IE 1.0 ships as Windows 95 feature 11/95 IE 2.0 ships 3/96 MS Professional Developer’s Conference AOL deal, Java license announced 8/96 IE 3.0 ships, wins all but PC Mag review 9/97 IE 4.0 ships, wins all the reviews IE Feature Chronology IE 1.0 (7/14/95) IE 2.0 (11/17/95) HTML 2.0 HTML Tables, other NS enhancements HTML <font face=> Cell background colors & images Progressive Rendering HTTP cookies (arthurbi) Windows Integration SSL Start.Run HTML (MS enhancements) Internet Shortcuts <marquee> Password Caching background sounds Auto Connect, in-line AVIs Disconnect Active VRML 1.0 Navigator parity MS innovation Feature Chronology - continued IE 3.0 (8/12/96) IE 3.0 - continued... IE 4.0 (9/12/97) Java Accessibility Dynamic HTML (W3C) HTML Frames PICS (W3C) Data Binding Floating frames HTML CSS (W3C) 2D positioning Componentized HTML <object> (W3C) Java JDK 1.1 ActiveX Scripting ActiveX Controls Explorer Bars JavaScript Code Download Active Setup VBScript Code Signing Active Channels MSHTML, SHDOCVW IEAK (corporations) CDF (XML) WININET, URLMON Internet Setup Wizard Security Zones DocObj hosting Referral Server Windows Integration Single Explorer ActiveDesktop™ Navigator parity MS innovation Quick Launch, … Wins for IE • Quality • CoolBar, Explorer Bars • Componetization • Great Mail/News Client • ActiveX Controls – Outlook Express – vs. Nav plug-ins
    [Show full text]
  • Programming-With-Actuate-Basic.Pdf
    Programming with Actuate Basic This documentation has been created for software version 11.0.5. It is also valid for subsequent software versions as long as no new document version is shipped with the product or is published at https://knowledge.opentext.com. Open Text Corporation 275 Frank Tompa Drive, Waterloo, Ontario, Canada, N2L 0A1 Tel: +1-519-888-7111 Toll Free Canada/USA: 1-800-499-6544 International: +800-4996-5440 Fax: +1-519-888-0677 Support: https://support.opentext.com For more information, visit https://www.opentext.com Copyright © 2017 Actuate. All Rights Reserved. Trademarks owned by Actuate “OpenText” is a trademark of Open Text. Disclaimer No Warranties and Limitation of Liability Every effort has been made to ensure the accuracy of the features and techniques presented in this publication. However, Open Text Corporation and its affiliates accept no responsibility and offer no warranty whether expressed or implied, for the accuracy of this publication. Document No. 170215-2-130331 February 15, 2017 Contents About Programming with Actuate Basic. .xi Part 1 Working with Actuate Basic Chapter 1 Introducing Actuate Basic . 3 About Actuate Basic . 4 Programming with Actuate Basic . 4 Understanding code elements . 5 About statements . 5 About expressions . 6 About operators . 7 Using an arithmetic operator . 7 Using a comparison operator . 8 Using logical operators . 8 Using the concatenation operator . 9 Adhering to coding conventions . 9 Commenting code . 10 Breaking up a long statement . 10 Adhering to naming rules . 10 Using the code examples . .11 Chapter 2 Understanding variables and data types . 13 About variables . 14 Declaring a variable .
    [Show full text]
  • The Microsoft Way: COM, OLE/Activex, COM+, and .NET CLR
    8557 Chapter 15 p329-380 8/10/02 12:24 pm Page 329 CHAPTER FIFTEEN The Microsoft way: COM, OLE/ActiveX, COM+, and .NET CLR In a sense, Microsoft is taking the easiest route. Instead of proposing a global standard and hoping to port its own systems to it, it continually re-engineers its existing application and platform base. Component technology is intro- duced gradually, gaining leverage from previous successes, such as the original Visual Basic controls (VBX – non-object-oriented components!), object link- ing and embedding (OLE), OLE database connectivity (ODBC), ActiveX, Microsoft Transaction Server (MTS), or active server pages (ASP). In the standards arena, Microsoft focuses mostly on internet (IETF) and web (W3C) standards. More recently, some of its .NET specifications (CLI and C#) where adopted by ECMA – a European standards body with a fast track to ISO (ECMA, 2001a, 2001b). Microsoft is not trying to align its approaches with OMG or Java standards. While Java figured prominently in Microsoft’s strategy for a while, it has been relegated to a mere continuation of support of its older Visual J++ product – in part as a result of a settlement between Sun and Microsoft. In addition, under the name Visual J# .NET, Microsoft offers a migration tool to .NET, primarily targeting users of Visual J++ 6.0. As part of the .NET initiative, Microsoft is promoting language neutrality as a major tenet of CLR and aims to establish a new language, C#. C# adopts many of the successful traits of Java, while adding several distinctive features of its own (such as value types) and not supporting key Java features (such as inner classes).
    [Show full text]
  • Windows® Scripting Secrets®
    4684-8 FM.f.qc 3/3/00 1:06 PM Page i ® WindowsSecrets® Scripting 4684-8 FM.f.qc 3/3/00 1:06 PM Page ii 4684-8 FM.f.qc 3/3/00 1:06 PM Page iii ® WindowsSecrets® Scripting Tobias Weltner Windows® Scripting Secrets® IDG Books Worldwide, Inc. An International Data Group Company Foster City, CA ♦ Chicago, IL ♦ Indianapolis, IN ♦ New York, NY 4684-8 FM.f.qc 3/3/00 1:06 PM Page iv Published by department at 800-762-2974. For reseller information, IDG Books Worldwide, Inc. including discounts and premium sales, please call our An International Data Group Company Reseller Customer Service department at 800-434-3422. 919 E. Hillsdale Blvd., Suite 400 For information on where to purchase IDG Books Foster City, CA 94404 Worldwide’s books outside the U.S., please contact our www.idgbooks.com (IDG Books Worldwide Web site) International Sales department at 317-596-5530 or fax Copyright © 2000 IDG Books Worldwide, Inc. All rights 317-572-4002. reserved. No part of this book, including interior design, For consumer information on foreign language cover design, and icons, may be reproduced or transmitted translations, please contact our Customer Service in any form, by any means (electronic, photocopying, department at 800-434-3422, fax 317-572-4002, or e-mail recording, or otherwise) without the prior written [email protected]. permission of the publisher. For information on licensing foreign or domestic rights, ISBN: 0-7645-4684-8 please phone +1-650-653-7098. Printed in the United States of America For sales inquiries and special prices for bulk quantities, 10 9 8 7 6 5 4 3 2 1 please contact our Order Services department at 1B/RT/QU/QQ/FC 800-434-3422 or write to the address above.
    [Show full text]