Get Equivalent ID Code

Description

“Get Equivalent ID Code” is a code utility script using the JSON Action Manager scripting library.

This stand-alone script written in JavaScript opens a dialog box with an input text field expecting the text string of a call to app.charIDToTypeID (), pasted from code copied from the ScriptingListenerJS.log file, for instance. Provided it does exist, the equivalent call to app.stringIDToTypeID () is then automatically displayed in real-time in another output text field (read-only); in some cases, more than one call (up to four) will be listed, when several (colliding/conflicting) equivalent StringIDs are available.

The output field format is kept identical to the input field format, including extra whitespace and optional elements: leading app. (Application root object) and trailing ; (JavaScript statement delimiter).

Get Equivalent ID Code Example - "H   "
Get Equivalent ID Code Example - "Strt"
Get Equivalent ID Code Example - "Lght"
Get Equivalent ID Code Example - "Hst2"
Get Equivalent ID Code Example - "Intr"
Get Equivalent ID Code Example - "Fbrs"

For the sake of completeness, the script works also the other way around, but it is less useful for code copied from the ScriptingListenerJS.log file, since the ScriptingListener plug-in only generates calls to app.stringIDToTypeID () for StringIDs which have no equivalent CharID.

Get Equivalent ID Code Example - "shapeOperation"
Get Equivalent ID Code Example - "intersect"

Requirements

This script can be used in Adobe Photoshop CS3 or later. It has been successfully tested in CS4 on Mac OS X, but should be platform agnostic.

Copyright

This Software is copyright © 2013-2016 by Michel MARIANI.

License

This Software is licensed under the GNU General Public License (GPL) v3.

Download

Installation

Download the Zip file and unzip it.

Move the script to the Presets/Scripts folder in the default preset location of the Adobe Photoshop application. On next launch, the script will appear in the File>Automate submenu.

Version History

  • 1.7

    • Added dialog centering.
    • Restricted script to CS3 or later for lack of appropriate layout support.
  • 1.6

    • Used new version 4.4.4 of jamEngine scripting library module.
  • 1.5

    • Used new version 4.4.1 of scripting library modules.
  • 1.4

    • Added display of example at start-up.
    • Used new version 4.0 of scripting library modules.
  • 1.3

    • Added optional field for numerical ID.
    • Used new version of scripting library modules.
  • 1.2

    • Cleaned up code.
  • 1.1

    • Allowed single-quoted string in addition to double-quoted.
  • 1.0

    • Initial release.

Tags: , , , ,

Comments are closed.