http://www.adobe.com/devnet/scripting.html
http://www.adobe.com/devnet/photoshop/scripting.html
You can call JavaScript scripts from AppleScript and VBScript scripts. See “Executing JavaScripts from AS or
VBS” on page 10.
For a file to be recognized by Photoshop as a valid script file it must have the correct file name extension:
To install a JavaScript in the Scripts menu, place it in the Scripts folder (Photoshop CS6 /Presets /Scripts).
The names of the scripts in the Scripts folder, without the file name extension, are displayed in the Scripts
menu. Any number of scripts may be installed in the Scripts menu.