Rapid-Q Documentation by William Yu (c)1999 Appendix A: QOLEOBJECT


QOLEOBJECT Компонент

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 Свойства
ПолеТипR/WПо умолчанию





QOleObject Методы
МетодТипОписаниеПараметры




ContainerQOLECONTAINERW
CreateObjectFUNCTION (ClassName AS STRING) AS INTEGERCreate COM object, with actual name or CLSID1
CreateRemoteFUNCTION (Host AS STRING, ClassName AS STRING) AS INTEGERCreate remote COM object, with actual name or CLSID2
FreeSUBRelease object0
GetIDofNameFUNCTION (Name AS STRING) AS INTEGERВозвращает the ID of an identifier, good for checking if it exists. Возвращает -1 if name is not found.1
GetObjectFUNCTION (ClassName AS STRING) AS INTEGERGet active COM object, with actual name or CLSID1
InvokeFUNCTIONI (ID AS STRING, Параметры, ...) AS VARIANTInvoke method/propertyInfinite
InvokeCopySUB (ID AS STRING, Object AS QOLEOBJECT)Copy object (might not work... yet)2

QOleObject События
СобытиеТипПроисходит когда...Параметры






QOleObject Примеры
' 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

Предыдущий Компонент Содержание Следующий Компонент