Adobe 23101764 Scripting Guide - Page 38

save JavaScripts here, JavaScripts display here

Page 38 highlights

Scripting Photoshop 3 Viewing Photoshop objects, commands and methods The singular advantage to writing JavaScripts is that the scripts run on any platform, regardless of the underlying hardware or operating system. JavaScript is consequently the language of choice for developers not wishing to lock themselves into a single proprietary platform. Use the text editor of your choice to create JavaScripts. To make scripts accessible to Photoshop, drag-and-drop your files directly into the "Presets>Scripts" folder. save JavaScripts here Restart the Photoshop application to display JavaScripts in the Scripts menu. The Scripts menu The Scripts menu displays under the Photoshop File menu. When a Scripts item is selected, a dialog is presented from which you can select a JavaScript for execution. JavaScripts display here A collection of JavaScripts comes pre-installed with Photoshop. These scripts display alongside the Scripts menu, as illustrated above. You can use these scripts "out-of-the-box" or create your own. Use the "Browse" option to locate scripts you've created in other directories or to find scripts that reside on a network. On both Mac and Windows, a JavaScript file must be saved as a text file with a '.js' file name extension. Click a script to execute it. If there is an error encountered during script execution, an error dialog will be displayed containing the error message returned by the script. Photoshop CS Scripting Guide 34

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105

Photoshop CS Scripting Guide
34
Scripting Photoshop
Viewing Photoshop objects, commands and methods
3
The singular advantage to writing JavaScripts is that the scripts run on any platform, regardless
of the underlying hardware or operating system.
JavaScript is consequently the language of choice for developers not wishing to lock
themselves into a single proprietary platform.
Use the text editor of your choice to create JavaScripts. To make scripts accessible to
Photoshop, drag-and-drop your
les directly into the "Presets>Scripts" folder.
Restart the Photoshop application to display JavaScripts in the Scripts menu.
The Scripts menu
The Scripts menu displays under the Photoshop File menu. When a Scripts item is selected,
a dialog is presented from which you can select a JavaScript for execution.
A collection of JavaScripts comes pre-installed with Photoshop. These scripts display
alongside the Scripts menu, as illustrated above.
You can use these scripts “out-of-the-box” or create your own. Use the “Browse” option to
locate scripts you’ve created in other directories or to
nd scripts that reside on a network.
On both Mac and Windows, a JavaScript
le must be saved as a text
le with a '.js'
le name
extension.
Click a script to execute it. If there is an error encountered during script execution, an error
dialog will be displayed containing the error message returned by the script.
save JavaScripts here
JavaScripts display here