[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AppleScript and MCL

Aseem writes-
> Hi,
> I have just started using MCL and would like to send AppleScript
> events to FileMaker Pro to retrieve dbase information.  Can this be
> done in MCL?  Can someone send me some code or point me as to how this
> could be done.  Thanks much.
> - aseem
> aseem@ptolemy.arc.nasa.gov

This is fairly straightforward, but first you must decide whether you
want to send the appleevents directly or execute Applescript commands
from MCL. Sending appleevents from MCL is easy except for the more
complicated events which include object specifiers, and of course these
are the kind you'll usually need to communicate with Filemaker. Creating
object specifiers from MCL is easy only after you've mastered the notion
of just what an object specifier is (it has nothing to do with CLOS
objects) and if you have the right utilities.

Executing Applescript commands from MCL is probably an easier approach
when you must send complicated events, but it requires the Applescript
extension to be present on your machine (this is not required to just
send appleevents), and it requires even more utility code.

In either case, Tom Bonura's excellent collection of utilities is a good
place to start. It's on cambridge.apple.com in directory

If you end up sending appleevents directly from MCL,
I would also recommend installing the Script Editor on your machine, if
you haven't already, and installing the various MacsBug dcmds
which let you dissect appleevents and object specifiers. These dcmds
can be found on the Applescript Software Development Kit CD-ROM.
Another good utility is AETracker, which is widely available. These
tools will let you create working scripts with the Script Editor and
then translate them to direct appleevents within MCL.