There are two primary methods to create scripts for Adobe Photoshop. The first method requires basic familiarity with the Adobe Photoshop object model and basic JavaScript programming skills. For structured scripts, use functions conveniently provided in the GeographicImager.jsxinc file that wrap low-level Adobe Photoshop calls to Geographic Imager functionality. The second approach to create scripts involves using the Adobe ScriptListener plug-in that records actions performed by the user (including those of Geographic Imager) and stores the results as a ready-to-execute text script-file. While it may allow to quickly create a script that performs the required sequence of action, the automatically created script is somewhat harder to modify and maintain, since it contains all the parameters hard-coded (such as paths to files). It is also harder to read and less structured, as it directly invokes Adobe Photoshop low-level functions by directly populating so-called Adobe Photoshop descriptors with the parameters required for each Adobe Photoshop or Geographic Imager command. If you choose to record your scripts using the Script Listener, you may want to carefully read GeographicImager.jsxinc to learn about the specific parameters that can be passed to Geographic Imager commands.
Refer to Adobe scripting documentation, Adobe forums (https://forums.adobe.com) and third-party sites that provide helpful information regarding scripting Adobe Photoshop functionality.
Geographic Imager installs a directory named Sample Scripts located at:
Windows (64-bit)
C:\Users\Public\Documents\Avenza\Geographic Imager\Help and Tutorial Data\Tutorial Data\Sample Scripts
Mac
/Applications/Avenza/Geographic Imager/Geographic Imager Plug-in/Help and Tutorial Data/Tutorial Data/Sample Scripts
The Sample Scripts folder contains:
ScriptExamples.jsx |
Provides information on all Geographic Imager scripting functions and samples. |
ScriptBatchProcessingExample.jsx |
Contains an example script for batch processing. |
Batch export to Avenza Maps.jsx |
Used for exporting multiple files to Avenza Maps. |
Two separate folders, StartupRegistrationScripts and IncludeScripts, contain scripts used to enable actions and scripting for Geographic Imager. These folders and its contents should not be renamed or deleted or else Geographic Imager automation will not be supported. If renamed or deleted, fix it by renaming the folders to their original names or reinstalling Geographic Imager.
Due to Adobe Photoshop limitations 3D scripting is no longer supported.
Scripted Adobe Photoshop actions that trigger Geographic Imager dialog boxes (e.g. saving a non-compliant document) will always assume a "show-errors-only" mode.
Geographic Imager dialog boxes, sub-dialog boxes or warnings that may appear during the execution of supported functions should respect whatever option is passed to them. Only the option that is explicitly scriptable through script parameters (and also displayed as action parameters if run from an action) will be recorded. All others will assume their default selections. This can be changed by checking the "Don’t show again" option (wherever it applies).
Due to Adobe Photoshop API limitations, Geographic Imager does not automatically read georeferencing from a geospatial PDF when it is opened using a script or action.
Unicode characters are not supported for DEM schema names when used in a script.
The creation of DEM schema cannot be recorded by Adobe ScriptListener or by using example scripts. Any DEM schema will have to be created prior to using automation.
Comments
0 comments
Please sign in to leave a comment.