image

Event Log

image

The event log lists the communications that pass between your script and target applications — Apple events and their results. You can also use it to hold messages sent by your script with the AppleScript log command.

The event log preserves the results of all Apple events performed during the execution of a script, and lets you explore those results. Thus it operates as a basic debugger, because, very often, what you said to an application and (especially) what answer that application gave is exactly what you want to know about your script.

By default, the event log is shown as a pane of the script window — the event log pane. To display the event log pane:

image

Instead of the event log pane, you may prefer to see the log in a separate window.

WARNING: If the log is showing while your script runs, your script may run slower (because of the overhead of displaying the log’s contents in real time). If speed (or accurate timing) is of the essence, close the log display before you execute your script and open it afterwards.

Scope Bar

At the top of the event log is a scope bar. You can show or hide the scope bar:

Columns

The event log has two columns:

image

An alternate way to see an explorer for an Apple event result, without the overhead of showing two columns in the event log simultaneously, is to double-click the event in the event list. This opens a separate explorer window on the result.

Miscellaneous

You can copy an Apple event from the log. This is the message sent by your script to a scriptable application. To do so:

You can copy a result of an Apple event from the log. This is the reply returned by a scriptable application to your script. To do so:

During debugging, a correspondence is maintained between each Apple event and the line of the script where it was performed. To highlight the corresponding script line:

By default, events remain in the log until the next execution of the script — that is, the default policy is to clear the log when execution begins. You can modify this policy. To clear the log immediately:

Just the opposite, to prevent the log from being cleared when the next execution begins:

Further Details:
  Event Log Window


image
Errors Record
image