Documenting Scripts - Adobe 23101764 - Photoshop CS - PC Manual

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

Advertisement

Scripting basics
2

Documenting scripts

2.4 Documenting scripts
It's recommended that you 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.
Visual Basic
In Visual Basic, you can break a long statement into multiple lines in the Code window by
using the line continuation character, which is a space followed by an underscore ( _).
17
Photoshop CS Scripting Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop cs

Table of Contents