Player
Documentation
Frontier
User's Guide
Chapter 5, Verbs
One Verb Per Page
Player.choosePopup
Syntax
Player.choosePopup(menu, item)
Player.choosePopup(menu, item, holding: modifierKeys, extraClick: desiredState)
Parameters
popup is either a name, ID number, or location (an {x, y} list or a point datatype)
item is either a name or position number.
holding: modifierKeys, an optional parameter, is one or more modifier keys (command, shift, option, control, caps lock) or their abbreviations (cmd, shft, opt, ctrl, caps), added together in any order.
extraClick: desiredState, set to 'false' to disable the extra click (for a slight increase in speed but at the risk of the app not noticing the changed popup value)
Action
Chooses a pop-up menu command.
Returns
True.
Examples
Player.choosePopup("File Format", "Text")
Player.choosePopup(13, "Plain Text") « format (in MORE)
Player.choosePopup( {220, 147}, "points" ) « height
Player.choosePopup("File Format", "Text", extraClick: false) « new in 1.5
Errors
The pop-up menu or item does not exist or is not enabled.
Notes
- Many pop-ups cannot by identified by name. These are often implemented as "user items" rather than true pop-ups. Use Player's balloon help to determine the ID number (if any) and location.
- As shown in the example, even if the popup itself must be specified by XY location, the item can usually be specified by name.
- You can make a script a little faster by setting extraClick to false. Unfortunately, it won't work in all cases. Even though the popup visibly changes, some applications don't notice the change without the extra click.
- The holding label may be left off, though the result may be less readable.
- 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.
See Also
Player.chooseHierPopup
Player.popupExists
Player.getPopupInfo
Player.getPopupAttribute
Player.setCompleteMatch
Player.choosePopupAt
Keywords
menus[3] dialogItems location modifiers
choosePopupAt
Copyright 1993-99, PreFab Software, Inc. All Rights Reserved.
This site built and maintained using Stage Three, a set of custom Frontier scripts.