[Pythonmac-SIG] Appscript and Excel
bob at redivi.com
Wed Apr 21 10:37:13 EDT 2004
On Apr 21, 2004, at 10:23 AM, Jack Jansen wrote:
> On 21-apr-04, at 13:33, has wrote:
>> The problem here is that Excel's 'Set' command («event XCELsetd») is
>> different to the core 'set' command («event coresetd») that your
>> AppleScript is using. (Turn on AEDebug and friends in the shell to
>> (appscript is much less forgiving of bad aetes than
> When I read this the question struck me: how come AppleScript can
> handle this case just fine? It doesn't have any more info to work from
> than appscript (or does it?) but somehow it does manage to convince
> Excel to set the cell, if I understand the original poster correctly.
> And couldn't a similar method to what AppleScript does be applied to
I think that AppleScript does a "dict.update" when it comes to new
terminology. If you want to override something you have to use chevron
syntax with the codes.
IMHO, the correct way to handle this from Python, is to diverge from
AppleScript and use namespaces.. Yes, it will make it harder for
people to translate AppleScript to Python, however, that shouldn't be
done by humans anyway. What we should be doing is compiling the
AppleScript and translating that it into equivalent Python code. Or,
just parse the "debugged" apple events and use that.
More information about the Pythonmac-SIG