Skip to content

Responding to a Chosen Menu Item

More basics. After you create a menu and a menu item in Interface Builder, in the last tab of the inspector give it a name, select the applescript in your project where you will be adding the script for the menu item, and then give it an event handler by checking Menu: Choose Menu Item in the list of possible Event Handlers listed below.

on choose menu item theObject
	if the name of theObject is "myMenuItem" then
		display dialog "You chose my new menu item."
	end if
end choose menu item