If a script command has modifiers, is there a way to choose among them from within the script using the command? Example: the FastScripts UI Suite includes this class and command:
Class message window: A self dismissing window suitable for unobtrusively displaying a message on the screen.
Plural form:
message windows
Properties:
<Inheritance> window [r/o] -- All of the properties of the superclass.
autodismiss time real -- time in seconds before the window will auto-dismiss
screen position top center/top left/center/bottom right/bottom left/bottom center/top right -- the location on the screen at which the message should appear
Command:
display message: Display a self-dismissing message at a specificed location on the screen.
display message Unicode text -- the message text to display
[at screen position top center/top left/center/bottom right/bottom left/bottom center/top right] -- the location on the main screen at which the message will appear, defaults to center
[dismissing after delay real] -- time in seconds to display before auto-dismissing, if zero then never auto-dismiss, defaults to 1 second
Result: message window -- the reply for the command
The problem is that notifications at the same position stack, so if more than one is to appear, I’d like the second to be at another position. How can I accomplish a selection from among the options when these one or two word descriptors are key words, not text? In essence, how can I compute an AppleScript command (self-modifying code, I guess) inside a script? (I realize I could just repeat the entire command with each of the possibilities and set up a “case” statement, but I’m interested in the “generic” answer.)