ObjectOpen

Opens or creates a COM/OLE Automation object

Syntax:

ObjectOpen(app.objname)

Parameters:

(s) app.objname name of the desired object.

Returns:

(i)  a special object handle to be used when referring to the object. See discussion in COM/OLE section.

 

ObjectOpen has been superceded with the function ObjectCreate.

The ObjectOpen function returns a handle to be used when referring to a COM/OLE Automation object. If the Object does not exist, the function will fail.

Example:


Browser = ObjectOpen("InternetExplorer.Application")
browser.visible = @TRUE
url = "http://www.winbatch.com"
browser.navigate (url)
If browser.readystate <> 4
   TimeDelay(0.5)
EndIf
TimeDelay(5)
BrowserDoc = Browser.Document
BrowserBody = BrowserDoc.Body
BrowserPage = BrowserBody.CreateTextRange
BrowserText = BrowserPage.Text
Message(url, BrowserText)
ObjectClose(Browser)
Exit
See Also:

ObjectCreate, COM/OLE, ObjectClose