Re: [X-POST] External Menu in FMP
Re: [X-POST] External Menu in FMP
- Subject: Re: [X-POST] External Menu in FMP
- From: Jed Verity <email@hidden>
- Date: Wed, 13 Dec 2000 08:23:23 -0800
Hi ;,
Thanks for the response. Actually, though, I was hoping that there was a way
to avoid the stay-open applet with the FMP script handler. In other words,
selecting a menu item in the external menu would send a do script event
directly to FMP. I know it's unlikely, given the potential for simultaneous
Apple Event conflicts, but we can hope, can't we?
And, while the stay-open applet handler isn't a bad idea in theory, I've
found that these little buggers prove to be extraordinarily problematic on
most of the machines in the office.
Thanks again for your effort and insight.
Jed
On the threshold of genius, SemiColon wrote:
>
At 9:16 AM -0800 12/12/00, Jed Verity wrote:
>
>
> Is it possible to trigger a FileMaker script with the External menu
>
> installed by the AppleScript "make menu" event? As far as I can tell, the
>
> External menu items can only send events to open applications (due to the
>
> required parameter of a process ID for targeting). Is this true? Does this
>
> mean I'd need to have a stay-open applet with a "do script" handler?
>
>
I looked at the provided example applet and database that comes with
>
FileMaker, and made two changes.
>
>
I created a FileMaker script called "Beeper" in the example db.
>
(guess what it does ;-)
>
>
I added inside the applet's event handler:
>
>
tell application "FileMaker Pro" to do script FileMaker script "Beeper"
>
>
To make it look like this:
>
>
on <<event kMENkMIS>> menuName
>
tell me to activate
>
if menuName = "First Custom Menu Item" then
>
tell application "FileMaker Pro" to do script FileMaker script "Beeper"
>
display dialog "First menu item was selected
>
"
>
else if menuName = "Second Custom Menu Item" then
>
display dialog "Second menu item was selected
>
"
>
end if
>
tell application "FileMaker Pro" to activate
>
end <<event kMENkMIS>>
>
>
--the above script contains "<<" and ">>", they represent chevrons
>
--(ASCII characters 199 and 200) and must be replaced with those
>
--characters in order for the script to work.
>
>
Selecting "First Custom Menu Item" from the external menu triggered
>
the script that I added to the example database.
>
>
Is that what you wanted to do?
>
>
;
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
~)~)~)~)~)~)~)~)~)~)~)~)~)
Jed Verity