Re: Menu Contents?
Re: Menu Contents?
- Subject: Re: Menu Contents?
- From: Tim Bumgarner <email@hidden>
- Date: Fri, 1 Feb 2002 21:15:20 -0500
Hi Chuck,
On Friday, February 1, 2002, at 08:44 PM, Chuck Ross wrote:
I'm trying my first AppleScript Studio application. Part of the
interface is a popup menu with three options. When the user selects an
option, nothing needs to happen, but when they click a button then I
need to know what that menu says?
I know the name of the popup menu and the name of the window it is in,
but I can't seem to get the selected item on the menu.
Here's what I know. If I want to get the contents of the menu when
it's been selected, I can use this:
on choose menu item theObject
if the name of theObject is "replaceMenu" then
set menuItemTitle to title of theObject as string
end if
end choose menu item
What I want is something like this:
on clicked theObject
if the name of theObject is "testButton" then
set menuName to title of menu "replaceMenu" of window
"recoveryWindow"
end if
end on clicked
Try 'set menuName to title of current menu item of popup button "popup
(or whatever you named it)" of window "recoveryWindow"'.
And while I'm at it, what's the easiest way to test a droplet with
AppleScript Studio? Do I need to actually build the application? I
figured that if I ran it and dragged to it's dock icon that should
work, but it doesn't seem to.
Thanks,
Chuck
--
Sometimes the icon in the dock won't accept items (even though it is set
to by default), but you can always use Cmd + Option keys when you drag
object to the icon and that forces it to accept it. You can also debug
this same way, by doing a "Debug" or "Build and Debug", setting
breakpoints in your "on open" handler and then dragging Finder items to
the icon in the dock (or in the Finder).
Charles E. Ross
Database/Application Developer
(661) 943-9169
fax: (253) 663-0082
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.
By the way, there is also a Studio specific list
'email@hidden.
Tim Bumgarner
AppleScript Studio Engineering