Documenting Scripts - Adobe 23101335 - Photoshop - PC Manual

Scripting guide
Hide thumbs Also See for 23101335 - Photoshop - PC:
Table of Contents

Advertisement

Scripting basics
2

Documenting scripts

When you identify an object in this fashion, you're creating an object reference. While
AppleScript, Visual Basic and JavaScript use different syntax for object references, each gives
the script a way of finding the object you want.
2.3 Documenting scripts
Use comments within your scripts to explain what procedures are taking place. It's a quick
way to document your work for others and an important element to remember when writing
scripts. Comments are ignored by the scripting system as the script executes and cause no run-
time speed penalty.
AppleScript
To enter a single-line comment in an AppleScript, type "--" to the left of your description. For
multiple line comments, start your comment with the characters "(*" and end it with "*)".
-- this is a single-line comment
(* this is a
multiple line comment *)
Visual Basic
In Visual Basic, enter "Rem" (for "remark") or " ' " (a single straight quote) to the left of the
comment.
Rem this is a comment
' and so is this
JavaScript
In JavaScript, use the double forward slash to comment a single line or a /* */ notation for
multi-line comments
// This comments until the end of the line
/* This comments
this entire
block of text */
About long script lines
In some cases, individual script lines are too long to print on a single line in this guide.
AppleScript
AppleScript uses the special character (¬) to show that the line continues to the next line. This
continuation character denotes a "soft return" in the script. You can enter this character in the
script editor by pressing Option-Return at the end of the line you wish to continue.
11
Photoshop 7.0 Scripting Guide

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop 7.0

Table of Contents