LNS Home
Script Debugger
Download & Buy
x Explore
x Edit
x Run & Debug
x Deploy
What's New In 4.5
bullet Documentation
bullet Blog Posts
My SD Story
Software Updates
 
4.0.9 Update
3.0.9 Update
bullet 2.0.5 Update
x Free Downloads
 
XML Tools
XSLT Tools
x Property List Tools
x List & Record Tools
Register Your Copy of Script Debugger
Join the Script Debugger Mailing List
x AppleScript/ Scripting Links
Products
x Script Debugger 4.5
Site Contents
bullet Mark’s Blog
Product Registration
Bug Reporting
x Freeware
Contacting Us

SD4 Headling


image

Apple Event Log

image

The Apple Event Log is a place where your script can generate messages during execution (with the AppleScript log command), plus you can keep track of the Apple events that pass between your script and target applications. To summon the Apple Event Log window:

  • Choose Window > Apple Event Log. (No logging takes place unless the window is open.) You can also add an Apple Event Log button to the script window’s toolbar.
image

The tabs along the bottom of the Apple Event Log window list open script windows. There is only one Apple Event Log window, but you can have many scripts open, so each script is logged into its own tab.

You can determine whether (and how) each script performs logging when it executes. You can make this determination — and you can actually run the script — while working either in the script window or in the Apple Event Log window:

  • If you’re working in a script window, use the View menu to control logging, and use the Script menu or the toolbar to control script execution. As you switch between script windows, the Apple Event Log window automatically brings forward the tab of the frontmost script window, so you can watch the log easily.

  • If you’re working in the Apple Event Log window, use the toolbar or the View menu to control logging, and use the Script menu to control script execution. To determine which script you’re controlling, use the tabs at the bottom of the Apple Event Log window. Whichever tab is frontmost, that’s the script you’re controlling. (You can also bring a particular script window to the front, by double-clicking its tab.)

The toolbar’s Format popup menu items (and the corresponding menu items in the View menu) determine the “language” in which subsequent logging will be shown:

  • Source (or View > Log As Source) means the compiled OSA language of the script being run. Typically, this will be AppleScript.
  • AEPrint (or View > Log As AEPrint) means that the entire structure of Apple events is shown in AEPrint format.
  • Raw (or View > Log As Raw (Chevron) Events) is like a combination of the other two. Logging is done in the source language, but individual terms are shown as raw Apple event codes, much as you can do with a script or dictionary.

The toolbar’s Logging popup menu items (and the corresponding menu items in the View menu) determine what will be logged:

  • Nothing (or View > Log Nothing) means that logging is turned off for this script. (Logging slows down a script’s execution, so if the Apple Event Log window is open, for maximum speed when you run a script, turn off logging for that script.)
  • Log Events (or View > Log Log Events) means that only log commands in the script will cause the log to be written to. A log command in your script has no effect unless the Apple Event Log window is already open and the Logging setting is not Nothing. A log command causes the logged value to appear in the Apple Event Log window as if it were a multi-line comment, (*thus*).
  • All Events (or View > Log All Events) means that log commands and all outgoing Apple events will be logged.
  • All Events & Replies (or View > Log All Events & Replies) means that log commands and all outgoing Apple events and the corresponding replies from the target application(s) will be logged.

Even if all events are being logged, your script can temporarily disable logging of outgoing Apple events, in code, by issuing the stop log command. (And then logging can be enabled by issuing the start log command.) The stop log and start log commands are built into AppleScript, but only Script Debugger obeys them (you can’t issue these commands in Apple’s Script Editor).

You can control the Apple Event Log window modes and views. Also, when you’re debugging, the Apple Event Log window takes on additional powers.

Further Details:
  Logging Modes and Views


Explore | Edit | Run & Debug | Deploy | What's New In 4.5 | My SD Story


Copyright © 1998-2009 Late Night Software Ltd. - All Rights Reserved.