beautypg.com

Recording actions in the finder 1 – Apple AppleScript Finder Guide User Manual

Page 17

background image

C H A P T E R 1

Introduction to Finder Scripting

Recording Actions in the Finder

5

Recording Actions in the Finder

1

You can record almost any actions in the Finder that involve manipulating

Finder windows or icons: for example, opening folders, copying files, or

changing View settings. To record actions in the Finder, click the Record button

in the Script Editor application, then activate the Finder (by clicking on the

desktop or choosing Finder from the Applications menu) and perform the

actions that you want to record.
For example, suppose you like to have certain Finder windows arranged next

to each other on the desktop when you’re working on financial matters, so

that related files, alias files, or applications are easily accessible. To record the

arrangement you want, follow these steps:

1. Open the Script Editor application.

2. Click the Record button.

3. Activate the Finder by clicking on the desktop or choosing Finder from

the Applications menu.

4. If any Finder windows are currently open, close them all by holding down

the Option key and clicking the close box of the active window.

5. Open, resize, and arrange the windows whose positions you want

to record.

6. When you’re satisfied with the arrangement of the desktop, activate the

Script Editor again and click the Stop button.

The recorded script should look something like the one in Listing 1-1 on page 6.
If you save your recorded script as a script application, you can arrange the

windows the same way at any time by double-clicking the script’s icon in the

Finder. The Finder responds by closing any windows that are currently open

and opening and arranging windows as specified in the script.