While overhauling/updating the slides in the Windows section, one question arises: should the
IBM/Lotus Notes, IBM/Lotus WordPro and IBM/Lotus 1-2-3 samples in in "samples\ole\apps" be kept?
Nowadays probably nobody has these applications installed and operable since IBM pulled them from
the market. Maybe with the exception of IBM/Lotus Notes? Affected: "samp04.rex", "samp05.rex",
"samp06.rex" (with "samp06.mwp"), "samp07.rex". (Or moving them into a subdirectory named 'archive'
or so?)
Runtime errors or not working correctly, so need updates:
* "samp08.rex": causes runtime condition (file not found)
* "samp11.rex": fetching IBM's current stock price does not work anymore;
leave it as is or try to
come up with a different solution?
* "samp13.rex": causes runtime condition, if the user overlooks the popup and
first closes the
MSIE window and then clicks on the popup causing "quit" to be sent to "msie"
which does not
exist anymore at that point in time; can be probably "healed" with a syntax
handler that ends
the script anyway
* "samp14.rex": causes runtime condition if MS Access is not available
Also note: Microsoft is doing its best to kill Internet Explorer in lieu of Chromium. It is to be
expected that the OLE access remains for years to come as many little scripts and programs probably
employ it to e.g. fetch web pages.
Walter was kind enough to test them, here the output of running these apps, that should demonstrate
how easy it is to use ooRexx for interacting with Windows via OLE. Actually this is really easy, but
if the samples do not work (anymore) it gives the (very!) wrong impression, that ooRexx cannot
really handle it. Here the output:
D:\ole\apps>rexx samp04
Please enter your name
Walter
Please enter a list of recipients (email addresses). Press enter after each
entry (end list
with 'Q').
pa...@chello.ar
Q
*-* Compiled method "INIT" with scope "OLEObject".
*-* Compiled method "NEW" with scope "Object".
51 *-* Method NEW with scope "OLEObject" in package "REXX" (no source
available).
66 *-* Session = .OLEObject~New("Notes.NotesSession")
Error 98 running REXX line 51: Execution error.
Error 98.909: Class "Notes.NotesSession" not found.
D:\ole\apps>rexx samp05
*-* Compiled method "INIT" with scope "OLEObject".
*-* Compiled method "NEW" with scope "Object".
51 *-* Method NEW with scope "OLEObject" in package "REXX" (no source
available).
52 *-* WordProApp = .OLEObject~New("WordPro.Application")
Error 98 running REXX line 51: Execution error.
Error 98.909: Class "WordPro.Application" not found.
D:\ole\apps>rexx samp06
Please enter your name:
Walter
Please enter your phone number:
2147664
*-* Compiled method "INIT" with scope "OLEObject".
*-* Compiled method "NEW" with scope "Object".
51 *-* Method NEW with scope "OLEObject" in package "REXX" (no source
available).
74 *-* WordProApp = .OLEObject~New("WordPro.Application")
Error 98 running REXX line 51: Execution error.
Error 98.909: Class "WordPro.Application" not found.
D:\ole\apps>rexx samp07
*-* Compiled method "INIT" with scope "OLEObject".
*-* Compiled method "NEW" with scope "Object".
51 *-* Method NEW with scope "OLEObject" in package "REXX" (no source
available).
50 *-* Workbook = .OLEObject~New("Lotus123.Workbook")
Error 98 running REXX line 51: Execution error.
Error 98.909: Class "Lotus123.Workbook" not found.
D:\ole\apps>rexx samp08
Created C:\Users\Walter\AppData\Local\Temp\OLERexx. Press enter to continue
*-* Compiled method "UNKNOWN" with scope "OLEObject".
95 *-* Documents~Open(FileName)
Error 92 running D:\ole\apps\samp08.rex line 95: OLE error.
Error 92.906: OLE exception: Code: 800a1436 Source: Microsoft Word
Description: Wir konnten
Ihre Datei leider nicht finden. Wurde sie verschoben, umbenannt oder
gel?scht??
(C:\Users\Walter\AppData\...\Temp\OLERexx).
D:\ole\apps>rexx samp11
Getting stock price from IBM Internet page.
Using a not visible InternetExplorer.
IBM stocks are at <could not read stock price>.
Web page has likely changed format.
D:\ole\apps>rexx samp13
*-* Compiled method "UNKNOWN" with scope "OLEObject".
110 *-* myIE~quit
Error 92 running D:\ole\apps\samp13.rex line 110: OLE error.
Error 92.901: An unknown OLE error occurred (HRESULT=800706BA).
D:\ole\apps>
D:\ole\apps>rexx samp14
*-* Compiled method "UNKNOWN" with scope "OLEObject".
71 *-* appAccess~NewCurrentDatabase(strDB)
Error 92 running D:\ole\apps\samp14.rex line 71: OLE error.
Error 92.906: OLE exception: Code: 800a7f46 Source: unavailable
Description: Der angegebene
Dateiname konnte nicht zum Erstellen einer Datenbank verwendet werden. Geben
Sie einen anderen
Datenbanknamen an..
---
A note: "curl" has been available on Unix machines for a long time, Windows 10 includes it too, such
that it may make sense to supply an example to take advantage of it (using the curl command with
"address ... with"). A colleague has come up with such samples for the new introductory slides (for
ooRexx and Windows' OLE; he also has been preparing introductory nutshell samples for Excel, Word
and PowerPoint, maybe Outlook as well), whom I can ask to donate them to the ooRexx project.
In this context of using ooRexx to interact with Windows programs via OLE/COM I updated an older set
of tools that uses the registry and OLEObject to query the available ProgIDs/CLSIDs and create
HTML-rendered documentations of the published APIs, if any. Currently it can be fetched from
<https://wi.wu.ac.at/rgf/wu/lehre/autowin/material/resources/oleinfo.zip>. The readme.txt explains
the tool (it is rather easy, e.g. "createOleInfo.rex InternetExplorer.Application" which includes
the constants at the end or "createOleInfo.rex InternetExplorer.Application 1" in a page-saving
reference format). I can supply it for inclusion in the ooRexx project as it allows to document any
Windows application with a ProgID or CLSID and an OLE interface in a sensible (easy to grasp) manner.
---
So the question is, what to do?
---rony
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel