Appendix A: QOLEOBJECT
Rapid-Q Documentation by William Yu (c)1999 |
Appendix A: QOLEOBJECT |
|
QOLEOBJECT Component
QOleObject implements an automation client. Type checking is disabled for
this component, see examples on how this can help you.
This component is currently in an experimental stage. Longs, Doubles, and
Strings are currently supported, other data types may be added later.
QOleObject Properties
QOleObject Methods
Method | Type | Description | Params |
|
|
|
|
Container | QOLECONTAINER | W | |
CreateObject | FUNCTION (ClassName AS STRING) AS INTEGER | Create COM object, with actual name or CLSID | 1 |
CreateRemote | FUNCTION (Host AS STRING, ClassName AS STRING) AS INTEGER | Create remote COM object, with actual name or CLSID | 2 |
Free | SUB | Release object | 0 |
GetIDofName | FUNCTION (Name AS STRING) AS INTEGER | Returns the ID of an identifier, good for checking if it exists. Returns -1 if name is not found. | 1 |
GetObject | FUNCTION (ClassName AS STRING) AS INTEGER | Get active COM object, with actual name or CLSID | 1 |
Invoke | FUNCTIONI (ID AS STRING, Params, ...) AS VARIANT | Invoke method/property | Infinite |
InvokeCopy | SUB (ID AS STRING, Object AS QOLEOBJECT) | Copy object (might not work... yet) | 2 |
QOleObject Events
Event | Type | Occurs when... | Params |
|
|
|
|
QOleObject Examples
' This example requires MS WORD
' If you're using a localized version with a foreign language,
' you'll have to adjust the parameter names to match.
' Comments in italics indicate the old style syntax before
' type checking was disabled. You can choose either approach.
$ESCAPECHARS ON
DIM Object AS QOLEOBJECT
'Object.CreateObject("{000209FE-0000-0000-C000-000000000046}")
Object.CreateObject("Word.Basic")
'Object.Invoke("AppShow")
Object.AppShow
'Object.Invoke("AppMaximize", "", 1)
Object.AppMaximize("", 1)
'Object.Invoke("FileNew")
Object.FileNew
PRINT Object.Bold '-- is bold enabled?
Object.Insert("Hello world!\n")
Object.Bold
PRINT Object.Bold '-- Bold should be enabled
Object.Insert("Rapid-Q is awesome!\n")
Object.Bold(0) '-- Turn Bold off
SLEEP 5
Object.Free
|
|