Adobe 23101335 Scripting Guide - Page 11
Documenting scripts, multiple line comment
UPC - 718659152833
View all Adobe 23101335 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 11 highlights
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 runtime 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. Photoshop 7.0 Scripting Guide 11