Re: Using Script Editor
Re: Using Script Editor
- Subject: Re: Using Script Editor
- From: Stan Cleveland <email@hidden>
- Date: Fri, 25 Apr 2008 16:29:38 -0700
- Thread-topic: Using Script Editor
On 4/25/08 3:32 PM, "Raymond P Reedy" wrote:
> In the MacTech article "Converting VBA Macros to AppleScript in
> Microsoft Office" by Paul Berkowitz on Page 75, he writes at the end
> of the sixth paragraph...
>
> "There are a few tricks needed for using a Script Editor with more
> than one version of an application, which I will explain below."
>
> I cannot find the reference to those tricks (Paul, are you listening?).
> Can I safely use Office 2004 and 2008 on the same machine? (iMac 1.8
> GHz PowerPC G5---OS X 10.4.11)
As Paul mentions in his article, you shouldn't run multiple versions of a
program at the same time (like Excel X and Excel 2004). Since both
applications are named "Microsoft Excel", and because applications are
referenced primarily by their name, your script editor will confuse the two
versions of Excel.
I won't profess to know Paul's "tricks," but I have one of my own that is
very simple and addresses the problem. It allows you to work with different
versions of an application--at DIFFERENT times--on the same machine.
When switching from one version of an application to another (from Excel
2004 to Excel X, say) you must quit your script editor AND the currently
running version of the program. Next, launch the other version of the
application and, lastly, relaunch the script editor. By doing things in that
order, you effectively purge the "old" application dictionary from the
script editor and load the "new" dictionary.
If the editor is not quit and then relaunched AFTER starting the "new"
version of the application, the wrong dictionary will remain in memory. As a
result, your scripts will compile with raw class and event codes instead of
the expected English-like terminology. Also, your scripts won't run, since
the application can't interpret the unknown raw codes. (If it DID understand
them, it would have already cooperated with the editor to compile them into
human-readable terminology.)
I hope that all makes sense. Of course, Paul may have more information to
add, but this should give you a starting point.
> On a related item...
>
> Are there any scripting caveats to switching to Office 2008 for Mac,
> besides the VBA thing??
Having not yet switched to 2008 myself, I leave this to others to answer.
HTH,
Stan C.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden