Prompt for event recipient

Command group Flag affected Reversible Execute on client Platform(s)
Apple events YES NO NO macOS

Syntax

Prompt for event recipient {recipient-tag}

Description

This command prompts the user to select the name of an application which will become the destination of all subsequent events. The recipient tag is entered also. Recipient tags may have a maximum of 31 characters. Several recipients may be prompted for, each with a different tag, but you can use only one at a time. A complete list of current recipients is built with the Build list of event recipients command.

If no recipient tag is specified for the application, the tag will be supplied by Omnis. Its name will be capitalized and spaces removed. Once an event recipient has been tagged, you can use the tag as a parameter for the Use event recipient command without further prompting, thus allowing recipients to be changed easily.

Example

; this example is a pushbutton method which sets up two recipients

On evClick
  OK message {Locate the Excel spreadsheet for me}
  Prompt for event recipient {Sheet} ;; tagged as "Sheet"
  OK message {Locate the remote database for me}
  Prompt for event recipient {Data} ;; tagged as "Data"

  Begin reversible block
    Set current list iList
  End reversible block
  Build list of event recipients
  Set event recipient {[iList(1,1)]} ;; uses first recipient in the list, that is R1, C1