Re: [X-POST] External Menu in FMP
Re: [X-POST] External Menu in FMP
- Subject: Re: [X-POST] External Menu in FMP
- From: SemiColon <email@hidden>
- Date: Tue, 12 Dec 2000 22:47:47 -0800
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?
;