Use event recipient

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

Syntax

Use event recipient {recipient-tag}

Description

This command sets the event recipient by specifying the recipient tag. The named event recipient must be currently available on the network; that is, its name must be on the Apple Application menu.

When Omnis is launched, the recipient defaults to Omnis, that is, events are sent to itself. Similarly, if you use this command without a parameter, the recipient reverts to Omnis.

The following example shows the difference between Use event recipient, which is used with a tag previously assigned by the user with Prompt for event recipient, and Set event recipient, which takes a local application name as a parameter, and turns it into a recipient tag.

Example

; prompt user and select application
Prompt for event recipient {MyAppl}
; do something with MyAppl
; This is the name of the current application, as shown on the Apple Application menu
Set event recipient {Microsoft Excel}
; do something in 'Excel'
; go back to the tagged recipient, previously prompted for
Use event recipient {MyAppl}
; do something else
; Finally go back to Omnis by resetting recipient with no prompt
Use event recipient