Exceed® Windows Scripting Programmer’s Guide
Exceed—Windows Scripting Programmer’s Guide 0900 PDF Published in Canada 09/22/03 Hummingbird Ltd. 1 Sparks Avenue, Toronto, Ontario, Canada M2H 2W1 Toll Free (Canada/USA): +1 877 FLY HUMM (359 4866) Tel: +1 416 496 2200 Fax: +1 416 496 2207 E-mail:
[email protected] FTP: ftp.hummingbird.com For more information, visit www.hummingbird.com RESTRICTED RIGHTS LEGEND. Unpublished rights reserved under the copyright laws of the United States. The SOFTWARE is provided with restricted rights. Use, duplications, or disclosure by the U.S. Government is subject to restrictions as set forth in subparagraph (c) (1) (ii) of The Rights in Technical Data and Computer Software clause at DFARS 252.227-7013, subparagraph (c) (1) and (2) (a) (15) of the Commercial Computer Software-Restricted Rights clause at 48 CFR 52.227-19, as applicable, similar clauses in the FAR and NASA FAR Supplement, any successor or similar regulation. Information in this document is subject to change without notice and does not represent a commitment on the part of Hummingbird Ltd. Not all copyrights pertain to all products. While every attempt has been made to ensure the accuracy and completeness of the information in this document, some typographical or technical errors may exist. Copyright © 2003, Hummingbird Ltd. All rights reserved. Trademarks and logos are the intellectual property of Hummingbird Ltd. Connectivity Kerberos, Connectivity Secure Shell, Connectivity SSL, Exceed, Exceed 3D, Exceed Connectivity Suite, Exceed onDemand, Exceed onDemand Client, Exceed onDemand Deployment Wizard, Exceed onDemand Server, Exceed onDemand Server Manager, Exceed PowerSuite, Exceed XDK, HostExplorer, HostExplorer Connectivity Suite, HostExplorer Host Access, HostExplorer Print Services, HostExplorer Web, Hummingbird Basic, Hummingbird Certificate Manager, Hummingbird Connectivity, Hummingbird Connectivity Suite, Hummingbird Core Services, Hummingbird Deployment Packager, Hummingbird Deployment Wizard, Hummingbird e-Gateway, Hummingbird FTP, Hummingbird InetD, Hummingbird Portal, Hummingbird Proxy Server, Hummingbird SOCKS Client, NFS Maestro, NFS Maestro Client, NFS Maestro Gateway, NFS Maestro Server, NFS Maestro Solo, NFS Maestro Tuner, TXP, TXPM, and Xweb are trademarks of Hummingbird Ltd. and/or its subsidiaries. All other copyrights, trademarks, and tradenames are the property of their respective owners. DISCLAIMER Hummingbird Ltd. software and documentation has been tested and reviewed. Nevertheless, Hummingbird Ltd. makes no warranty or representation, either express or implied, with respect to the software and documentation included. In no event will Hummingbird Ltd. be liable for direct, indirect, special, incidental, or consequential damages resulting from any defect in the software or documentation included with these products. In particular, Hummingbird Ltd. shall have no liability for any programs or data used with these products, including the cost of recovering such programs or data.
ii
Contents
Overview ..................................................................................................................... 1 Functional Specifications .......................................................................................... 1 Object Hierarchies ..................................................................................... 1 Error Reporting .......................................................................................... 2 Connectivity Implementation ................................................................................... 3 Exceed Implementation ............................................................................................. 4 Properties ................................................................................................... 4 Methods ..................................................................................................... 4 GetCandidateDisplayNumber ............................................................. 4 GetCurrentDisplayNumbers ................................................................ 5 GetWstart ............................................................................................. 5 GetXconfig ........................................................................................... 6 GetXstart .............................................................................................. 6 Launch ................................................................................................. 6 Samples ...................................................................................................... 7 Get Next Display Number ................................................................... 7 Get Current Display Numbers ............................................................. 8 Xconfig Implementation ........................................................................................... 9 Properties ................................................................................................... 9 Methods ................................................................................................... 10 GetElement ........................................................................................ 10 GetElementAttribute ......................................................................... 10 GetElementAttributes ........................................................................ 11 GetElementValue ............................................................................... 11 GetXfonts ........................................................................................... 12 GetXkeys ............................................................................................ 13 iii
Exceed—Windows Scripting
Load .................................................................................................... 13 Save .................................................................................................... 14 SetElementValue ................................................................................ 14 SetXML ............................................................................................... 15 SetXMLFromFile ................................................................................ 15 Unload ................................................................................................ 15 Samples ..................................................................................................... 16 Get Element Information ................................................................... 16 Import Xconfig settings from a sparse XML file ................................ 17 Xfonts Implementation ........................................................................................... 18 Properties ................................................................................................. 18 Methods .................................................................................................... 18 GetFdb ................................................................................................ 18 GetFdbByFname ................................................................................. 19 Load .................................................................................................... 19 Save .................................................................................................... 20 Unload ................................................................................................ 20 Samples ..................................................................................................... 20 Fdb Implementation ................................................................................................ 20 Properties ................................................................................................. 21 Methods .................................................................................................... 21 MoveDown ......................................................................................... 21 MoveUp .............................................................................................. 22 MoveTo .............................................................................................. 22 Validate .............................................................................................. 22 Samples ..................................................................................................... 23 Move a font path down ...................................................................... 23 Move a font path up ........................................................................... 24 Move a font path to an index ............................................................. 25 List properties of a font database ....................................................... 26 Interoperation of two Fdb objects ..................................................... 27 Delete a font path ............................................................................... 29 Add a font path entry ......................................................................... 32 Error Handling ................................................................................... 34 iv
Contents
Xkeys Implementation ............................................................................................ 35 Properties ................................................................................................. 35 Methods ................................................................................................... 35 Launch ............................................................................................... 35 Samples .................................................................................................... 35 Launch Xkeys ..................................................................................... 35 Xstart Implementation ............................................................................................ 37 Properties ................................................................................................. 37 Methods ................................................................................................... 38 Launch ............................................................................................... 38 Save .................................................................................................... 38 Unload ............................................................................................... 38 Samples .................................................................................................... 39 Launch Xstart in launch mode .......................................................... 39 Technical Support .................................................................................................... 40
v
Functional Specifications—Object Hierarchies
Overview This technical white paper describes the functionality and scripting interfaces of the Hummingbird Object Model. Microsoft OLE Automation is used to provide a centralized proxy for external Windows Scripting access to underlying information and manipulation of Exceed products. Some existing function modules are revised or wrapped while a couple of new middleware modules are created.
Functional Specifications Object Hierarchies All objects, except Xkey, can be created by using CreateObject() in scripts or New in Visual Basic. Externally Createable Objects and Collections
Hummingbird Connectivity Accessories ……… Exceed ……… Xconfig Xfonts
Fdb
Xkey Xstart Wstart Xsession Xstart Wstart Externally createable object Collection Optional
1
Exceed—Windows Scripting
Considerations: •
There is no dependent object hierarchy for Xconfig XML nodes. Interfaces are provided for retrieving and setting the properties and verifying the soundness and integrity.
•
Xkey is a dependent object that can only be launched by Xconfig.
•
Shadowed rectangles are collections. Each object instance associates to an available profile. One Xconfig instance exists per session. We provide functions among several Xconfig profiles such as comparison and template merging or free merging.
Error Reporting Errors are reported as hexadecimal code.
2
Error Code
Description
0x81800001
Wrong parameter(s)
0x81810001
Display number is not set so further tasks cannot be carried out
0x81820001
The specific file has been opened
0x81820002
Error loading underlying module
0x81820003
Error open the Xconfig file
0x81820004
Access denied because of wrong password, etc.
0x81820005
Xconfig File has not been read in
0x81820006
Try to retrieve password field
0x81820007
There is no asociated element
0x81820008
Allow read only
0x81830001
Xstart .xs is not specified or doen't exist
0x81850001
Error loading underlying Xfonts module
0x81850002
Xfonts database is not loaded
0x81850003
Cannot find the specific Fdb in Font Database
0x81850004
Error initializing Xfonts module with specific Xfonts file
Functional Specifications—Object Hierarchies
Error Code
Description
0x81850005
Error saving to xdb file
0x81860002
Fdb object has been associated to a font database
0x81860003
This Fdb object has no valid data associated
0x81860004
Can not update this font database
0x81860005
Tried to go up beyond the top
0x81860006
Tried to go down beyond the bottom
0x81860007
Error swapping two items in a list
Connectivity Implementation Currently, there are no functions implemented for the objects in the following table. These objects/interfaces are reserved for future extension to products other than Exceed. Name
Value
Description
ProgID
Hummingbird.Connectivity
Version Independent
Main Interface
IConnectivity
3
Exceed—Windows Scripting
Exceed Implementation Name
Value
Description
ProgID
Hummingbird.Exceed
Version Independent
Main Interface
IExceed
Properties Name
Type
Description
Display
long
Display Number
Methods GetCandidateDisplayNumber Return the next available display number. HRESULT GetCandidateDisplayNumber([out, retval] long *pDisplayNumber) Items
Name
Type/Value
Description
Parameter
pDisplayNumber
[out, retval] long *
Display Number
Return Value
pDisplayNumber
[out, retval] long *
>= 0; The next available Display Number;