On 04.05.2022 14:51, Rony G. Flatscher wrote:

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?

Not communicating is a problem. A community only is visible, if it communicates.

From now on, if no one refers to postings, ideas, I will follow the simple Apache Software Foundation rule that if no one objects it is interpreted as a "go ahead". This follows the old rule: silence is taken as approval.

If having invested time in improvements, fixes and the like, because silence was taken as approval, I will not roll back such work myself, but whoever objects later giving sound, substantiated reasons and gets approval by other developers, will have to do the roll back. This is fairly easy as we are using a source code control system.

Any comments to this?

---

Regarding "samples\ole\apps": whenever I have free time to tackle that in one piece, I will go ahead and rename all the samples such that the interested lurker of samples can infer what application the samples use, maybe even creating a simple readme.txt file that briefly describes what gets demonstrated. Reason being that no one objected and makes the samples better accessible for interested programmers.

In addition I plan to add a few new samples, also from a colleague who created some interesting ones, e.g. using curl (available on Unix systems, in the meantime also on Windows) in various interesting ways.

---rony

P.S.: After the above planned changes I will have to re-alot my time to different projects, so not planning any initiatives from myself until ooRexx 5 gets released, with the possible exception of the important, already available multithreaded trace patch from Jean Louis (cf. the discussions at the beginning of September 2021!) which adds *incredible* value to debugging multithreaded ooRexx applications (and which also would put ooRexx in front of many programming languages with a need to debug multithreaded programs). My students would save a *lot* of time and effort having this great feature available in ooRexx. If a release of ooRexx 5 is planned in the short term and therefore imminent at this point in time, then IMHO the concurrent trace should be added right after the release.

_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to