[Pythonmac-SIG] inputing multi-digit numbers

Paul Berkowitz berkowit at silcom.com
Thu Nov 10 21:22:18 CET 2005


On 11/10/05 12:06 PM, "Kevin Walzer" <sw at wordtech-software.com> wrote:

> Paul Berkowitz wrote:
> 
>> It mirrors the VBA model, definitely, and its AppleScript syntax is thus a
>> little, shall we say "obscure",
> 
> 
> This is what I referring to. From Matt Neuburg's book, p. 331:
> "instead of working out an AppleScript scriptability implementation from
> scratch, they've simply taken the existing internal scripting
> implementation (Visual Basic for Applications) and exposed its entire
> object model, lock, stock, and barrel, to AppleScript...if you don't
> know how to drive Excel with Visual Basic it's really hard to figure out
> how to drive it with AppleScript."

Well, that was before they published the AppleScript Reference, which makes
it quite a bit easier. It's definitely not very "English-like", which
AppleScript is meant to be, but that shouldn't be a hindrance to Python
scripters. Using appscript with its dot language will actually put it back
to something more like the VBA from which it was "derived". Matt doesn't
have that quite right either: both VBA and AppleScript actually hook in,
separately, to the underlying OLE Automation model: AppleScript does not "go
through" VBA. But the model is definitely more accommodating to VBA, and to
Python, for that matter, than to normal AppleScript, since it was designed
for a language where you can specify the arguments of a method explicitly by
naming both the arguments (keys) and values rather than just have them all
run on like AppleScript does it.
> 
> I cede to your knowledge about the specifics of this, as I do very
> little with Excel from AS, and am still using v. X. I stand corrected in
> particular on driving it from Python via appscript.

It would certainly be "interesting" - but can be done.

-- 
Paul Berkowitz




More information about the Pythonmac-SIG mailing list