PreFab...Player...Documentation...AppleScript...User's Guide...Chapter 5, Verbs...One Verb Per Page...

do menu: choose from a pull-down menu


Syntax

do menu menu item nameOrPosition of menu nameOrPosition [of submenu nameOrPosition] [holding modifierKeys] [repeat until successful desiredState]


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

[holding modifierKeys] -- one or more modifier keys (command, shift, option, control, caps lock), concatenated with "&"

[repeat until successful desiredState] -- if true, Player will repeat the command until it is successful (or until the user aborts with command-period)


Result

true


Examples

do menu menu item "Select All" of menu "Edit"
do menu menu item "Save As" of menu "File" -- no trailing "..." required
do menu menu item 1 of menu "Edit" -- works for "Undo" or "Redo"
do menu menu item "Courier" of submenu "Font" of menu "Format"
do menu menu item "FAX" of menu "File" holding control & option
do menu menu item "Close" of menu "File" with repeat until successful


Notes



Errors

Menu or item does not exist or is not enabled; menubar is not available.


See Also

exists menu
get info menu
set dialog folder
set complete match
set menu selection location

| Top |


| Prev | Home | Next |do menu popup

Updated on 1/30/99 by Scott S. Lawton (ssl@prefab.com)

Copyright 1993-99, PreFab Software, Inc. All Rights Reserved.

This site built and maintained using Stage Three, a set of custom Frontier scripts.