Re: Apple - About Apple - Mailing Lists
Re: Apple - About Apple - Mailing Lists
- Subject: Re: Apple - About Apple - Mailing Lists
- From: Kai Edwards <email@hidden>
- Date: Sun, 27 Oct 2002 15:11:11 +0000
on Sat, 26 Oct 2002 12:04:32 -0400, Francois Guite <email@hidden>
wrote:
>
Could someone please tell me why this simple script, which changes the color
>
of the text in a FileMaker field, does not work when inserted into a
>
FileMaker + Perform AppleScript ; command (whether it be in directly in the
>
+ Script text ; window or in a + Value field ;):
>
>
tell application "FileMaker Pro"
>
activate
>
go to cell "cell name"
>
do menu menu item "Select All" of menu "Edit"
>
do menu menu item 210 of menu "Text Color" of menu "Format"
>
end tell
>
>
The script works just fine when run from + AppleScript Editor ;, but when
>
transferred to FileMaker 6, I get the following error message:
>
>
+ FileMaker Pro got an error: The event failed. (Error - 10000). ;
Aye - and there's the rub! Error -10000 means that the AppleEvent failed
(errAEEventFailed).
Why? Unfortunately, since all menu items are disabled while a ScriptMaker
script is running, you can't use the do menu event to select menu items when
running your script using the Perform AppleScript ScriptMaker step.
The way I usually get around this restriction is to write a separate script
containing the 'do menu' commands - and save it as an application. Then, in
the ScriptMaker script, use the 'Send Apple Event' command to send the 'open
application' event to the AS script app. (Perfect it's not - and the actions
of the AS script are performed after the FileMaker script is done - so use
with care.)
HTH
Kai
--
email@hidden
email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.