Script Editor Icon

Inserting tell blocks into your script

Tell statements direct the enclosed commands to a particular application or process. You can insert a prewritten tell block into your script using the shortcut menu (also know as the contextual menu.)

To insert a tell block into your script:

Step 1

Select the lines to be enclosed in a tell block. You can also choose to insert an empty tell block into the script text by placing the insertion point on a blank line.

Step 2

Control-click in the selected area.

Step 3

Choose the desired tell block option from the Tell Blocks submenu:

Tell “Finder": Encases the selected script text within a tell block directed at the Finder application.

Tell “System Events": Encases the selected script text within a tell block directed at the System Events application.

Tell Application: Encases the selected script text within an untargeted tell block.

Using Terms Clause: Encases the selected script text within a using terms clause.

The selected text will be enclosed within the chosen tell block.

Related Topics

shortcut menus