Python with the VBA recording capabilities 
Author Message
 Python with the VBA recording capabilities

I compared python to VBA (not for their syntax):

    VBA gives the programming capability to Applications

    Python gives the programming capability at the OS level
    (as shell scripts traditionally did )

VBA has the RECORD capability that transform any sequence of mouse clics
into a program that can be edited and then adapted. This recording
capability is amazingly efficient.

Can we imagine to add this feature to any current GUI (kde and others) ?



Tue, 02 Sep 2003 22:00:03 GMT  
 Python with the VBA recording capabilities

Quote:
> I compared Python to VBA (not for their syntax):

>     VBA gives the programming capability to Applications

>     Python gives the programming capability at the OS level
>     (as shell scripts traditionally did )

Python (with win32com) is basically on a par with VBA in terms
of its ability to script COM object models (the pluses and
minuses of each for this task are very subtle technical issues,
and we HAVE gone into them in the past on this forum).

Whether the 'programming' goes to an Application, to 'OS level',
or wherever, has zero to do with the language involved and
everything to do with the object-model involved.  For example,
with the 'Windows Scripting Host' object model, 'Scripting
Runtime', etc, VBA can just as well be used to automate OS
level tasks (though most users appear to prefer scripting
languages, such as VB Scripting Edition, for such tasks, still
VBA is quite able to perform them too).

Python has other, additional capabilities that do not rely on
scripting a COM/Automation object model (which VBA also does
to a very limited extent, for legacy-compatibility purposes,
but _almost_ all it does is scripting various object models --
that's how it interacts with its forms and the controls on
them, for example, although direct access to the Win32 API's
_is_ also feasible).

Quote:
> VBA has the RECORD capability that transform any sequence of mouse clics
> into a program that can be edited and then adapted. This recording
> capability is amazingly efficient.

Actually (as you'd know if you had ever tried integrating full
VBA support into an application), it is the application that has
to do most of the work for this purpose; the support actually
provided by the VBA framework for this purpose is helpful, but
quite minimal.

Quote:
> Can we imagine to add this feature to any current GUI (kde and others) ?

No, I can't imagine that; I don't see where the GUI gets into
the macro-recording process -- it's the _application_ (in VBA's
case, but I don't see much of an alternative?) that needs to
have a mode where keystroke, mouseclicks etc get 'recorded'
(by suitable calls that the application will make to the
recording utility) in terms that are semantically meaningful
on the application's object-model.

We do have (laying around somewhere) a generic COM recorder
we had developed to allow the 'capture and playback' mode of
our own applications to also produce editable scripts (at
first in our proprietary scripting language, with some idea
on how to generalize that), but we never invested the huge
amount of work to turn the proof-of-concept prototype into
production-level infrastructure -- our existing 'capture and
playback' having been deemed perfectly adequate for its
needed uses (basically, allowing some sequence of user actions
that reveals an application defect in some pre-release
version to be saved, then repeatedly replayed as a test to
prove the defect has indeed been fixed and does not come
up again in later pre-releases and releases).  The actual
recording infrastructure is the least of it -- the really
hard stuff is peppering the _application_ with suitable calls
to the recorder, to register relevant events at a semantically
appropriate level...

Alex



Tue, 02 Sep 2003 23:30:13 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Running Excel VBA Code from Python

2. String conversion between VBA and Python COM server

3. Python/WSH/VBA question

4. VBA and Python

5. python , activex control , vba

6. Strange discrepancy between Excel VBA and Python

7. Python as a substitute of VBA?

8. VBA to Python

9. Editors with Python or Active Scripting capability?

10. Capabilities of python?

11. Metalinguistic capability of Python?

12. Python timer capability?

 

 
Powered by phpBB® Forum Software