The distribution includes workspace examples to control and inspect controller properties of MS Word, Excel, Internet Explorer, CorelDraw8, CorelPhotoPaint, TextToSpeech, and other Windows applications.
| OLEAuto.st
OLEAuto.sll |
OLE/COM automation framework file-in source and library. |
| ARBase.sll | Alejandro Reimondo base components SLL |
| FileMe.In | Smalltalk source to prepare and open all workspace examples. |
| OLEAuto Word97.txt
OLEAuto Word95.txt OLEAuto Speech Examples.txt OLEAuto PowerPoint.txt OLEAuto PhotoPaint.txt OLEAuto Other Examples.txt OLEAuto Explorer.txt OLEAuto Excel97.txt OLEAuto Excel95.txt OLEAuto CorelDraw.txt |
Example workspace files which each demonstrate the OLE automation interface with MS Word, Excel, PowerPoint, and others. |
| ExcelStream.txt | Example workspace file to demonstrate automation streaming protocol with Excel 97. |
Additional files are included with the distribution in order to simplify creation of a working directory with VSE 3.1.2 to test the library.
| ARBase.sll | Alejandro Reimondo base components SLL |
| OLEAuto.sll
OLEAuto.st |
OLE/COM automation framework library and file-in source |
| vreg31w.sll | Registration Database Support |
| voleb31w.sll | OLE COM Support |
| volea31w.sll | OLE Automation Support |
The automation server applications to be controlled (e.g. MS Word, Excel, etc.) will also need to be installed.
#('ARBase' 'OleAuto') do:[:lib|SmalltalkLibraryBinder bindTo: lib].
(File pathNameReadOnly:'FileMe.In') fileIn; close.Open a workspace on the file ExcelStream.txt to demonstrate sending commands an Excel automation stream.
As the workspace file OLEAuto Other Examples.txt demonstrates given the version independent ProgID of the automation object from the registry (or obtained from a viewer such as the Microsoft OLE/COM Object Viewer, OleView.exe) one can create an automation controller class by evaluating
OLEAutomationApplication createApplication: 'VersionIndependentProgID'.
The class is named by the argument provided in the expression above. For example, if the version independent ProgID of the automation server is Office.Binder the class OfficeBinder is created. To open an automation controller on the Microsoft Office Binder one would evaluate
application := OfficeBinder new.
One could then inspect the application by sending the message #inspect to it or obtain a list of the server's methods by sending it the message #selectors.
When an error occurs in an automation component inspector its list pane
is not updated. This means that each time you select another property
in the inspector it will try to send the last offending message to update
the text pane and the last walkback will appear again. If you encounter
an error when inspecting an automation property, you can restore the state
of the inspector by selecting "self" at the top of the inspector.
Links to:
The
ObjectShare web site
VisualSmalltalk
Product Support
ObjectShare's
Online Documentation Site