Player
Documentation
AppleScript
User's Guide
Chapter 5, Verbs
One Verb Per Page
exists: does a pull-down menu or item exist?
Syntax
exists menu item nameOrPosition of menu nameOrPosition [of submenu nameOrPosition]
Parameters
menu item nameOrPosition -- name or position number (counting menu dividers) of the menu item
of menu nameOrPosition -- name or position number of the pull-down menu
[of submenu nameOrPosition] -- name or position number (counting menu dividers) of the submenu
Result
true if it exists, false otherwise
Examples
if exists menu item "" of menu "Graphics" -- the menu itself
if exists menu item "Grid On" of menu "Graphics" -- a menu item
if exists menu item "" of submenu "Alignment" of menu "Graphics" -- the submenu
if exists menu item "Center" of submenu "Alignment" of menu "Graphics"
Notes
- To see if a top-level menu or submenu exists, use an empty string "" for the item.
- If you get unexplained errors, see the separate Tech Support FAQ document.
- At present, this verb does not distinguish between an item and a submenu. An additional call to get info is required.
- For nested hierarchical menus, use the form "submenu;subsubmenu".
- By default, Player matches only the number of characters specified in the verb parameter. This feature has the benefit of ignoring trailing punctuation, but will occasionally find a false match.
- By default, name matching is not case sensitive.
Errors
Menubar is not available (e.g. a modal dialog is present).
See Also
get info menu
do menu
yield time
set complete match
exists popup
Copyright 1993-99, PreFab Software, Inc. All Rights Reserved.
This site built and maintained using Stage Three, a set of custom Frontier scripts.