|
|
|

|
Inserting Content
|
|
Script Debugger has many convenient shortcuts for inserting content into your script from elsewhere. Here’s a summary.
You have many ways to create a tell block targeting a particular application.
You can type an abbreviation corresponding to a text substitution.
You can type the start of an AppleScript term and let Script Debugger complete it for you.
You can take advantage of auto-closing to enter end lines automatically, and auto-pairing to enter closing delimiters automatically.
You can paste a clipping to insert boilerplate, such as an AppleScript control structure.
From the Finder, drag-and-drop a file or folder into your script. A dialog appears asking what you want to do.
If what you dragged is an application, one option is to insert a tell block targeting that application.
You can insert the name, alias, or pathname (POSIX or Macintosh-style) of the dropped items. If you dropped multiple items, these are placed in an AppleScript list.
You can insert an object specifier (reference) suitable for use in a tell block targeting the Finder.
If what you dragged is a text file, you can insert its contents.
From a dictionary window, choose Dictionary > Paste Tell.
If what’s selected is a command, what’s inserted is a template for issuing that command. The template is wrapped in a tell block if necessary.
If what’s selected is an event, what’s inserted is a template for an event handler for that event.
Otherwise, what’s inserted is a tell block.
From an explorer view, drag an entry into your script. (Drag from the first column.) Or, if this is a dictionary explorer, choose Dictionary > Paste Tell.
What’s inserted is a reference to the selected property or element (or element collection). The reference is wrapped in a tell block if necessary.
Alternatively, if what you wanted to insert is the value of a property, control-click on the property and choose Copy Value (or hold Shift and choose Edit > Copy), and then paste into your script.
Explore | Edit |
Run & Debug | Deploy | What's New In 4.5 |
My SD Story
|