• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Dollar ($) Object

This global ExtendScript object provides a number of debugging facilities and informational methods. The properties of the $ object allow you to get global information such as the most recent run-time error, and set flags that control debugging and localization behavior. The methods allow you to output text to the JavaScript Console during script execution, control execution and other ExtendScript behavior programmatically, and gather statistics on object use.

Dollar ($) object properties

buildNumberThe ExtendScript build number. Read only.
buildDateDateThe date ExtendScript was built. Read only.
errorError StringThe most recent run-time error information, contained in a JavaScript Error object.
  Assigning error text to this property generates a run-time error; however, the preferred way to generate a run-time error is to throw an Error object.
flagsNumberGets or sets low-level debug output flags. A logical AND of the following bit flag values:
  0x0002 (2): Displays each line with its line number as it is executed.
  0x0040 (64): Enables excessive garbage collection. Usually, garbage collection starts when the number of objects has increased by a certain amount since the last garbage collection. This flag causes ExtendScript to garbage collect after almost every statement. This impairs performance severely, but is useful when you suspect that an object gets released too soon.
  0x0080 (128): Displays all calls with their arguments and the return value.
  0x0100 (256): Enables extended error handling (see strict (page 235)).
  0x0200 (512): Enables the localization feature of the toString method. Equivalent to the localize (page 234) property.
globalObjectProvides access to the global object, which contains the JavaScript global namespace.
levelNumberEnables or disables the JavaScript debugger. One of:
  0: No debugging
  1: Break on run-time errors
  2: Full debug mode
localeStringGets or sets the current locale. The string contains five characters in the form LL_ RR, where LL is an ISO 639 language specifier, and RR is an ISO 3166 region specifier.
  Initially, this is the value that the application or the platform returns for the current user. You can set it to temporarily change the locale for testing. To return to the application or platform setting, set to undefined, null, or the empty string.
localizeBooleanEnable or disable the extended localization features of the built-in toString method. See “Localizing ExtendScript Strings” on page 240.
memCacheNumberGets or sets the ExtendScript memory cache size in bytes.
objectsNumberThe total count of all JavaScript objects defined so far. Read only.
osStringThe current operating system version. Read only.
screensArrayAn array of objects containing information about the display screens attached to your computer. Each object has the properties left, top, right, and bottom, which contain the four corners of each screen in global coordinates. A property primary is true if that object describes the primary display.
strictBooleanWhen true, any attempt to write to a read-only property causes a run-time error. Some objects do not permit the creation of new properties when true.
versionStringThe version number of the ExtendScript engine as a three-part number and description; for example: “3.6.5 (debug)”. Read only.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint