Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
1

charIDToTypeID( "xxx" ) Reference

Community Beginner ,
Nov 17, 2009 Nov 17, 2009

I am using scriptlistener to record some scripts.  It is of course filled with this stuff

var id41 = charIDToTypeID( "Vrtc" );

var id42 = charIDToTypeID( "#Rlt" );

I can figure some of it out. But I some I can't. In this case I am not sure what" #Rlt" means or if there are perhaps any other options that migh be used there.

Is there a reference somewhere to all of these codes?  Or is this just magic?

TIA

8.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Nov 17, 2009 Nov 17, 2009

The nearest official documentation will proberbly be the Javascript Reference Appenddix A : Event ID Codes.

This document should be found C:\Program Files\Adobe\Adobe Photoshop CS4\Scripting\Documents

Translate
Valorous Hero ,
Nov 17, 2009 Nov 17, 2009

I think X and Mike are the experts in this field but sometimes you can get something meaningful using:

$.writeln(typeIDToStringID(charIDToTypeID( "#Rlt")));

In this case it returns "distanceUnit" but I call it relative to 72pixels as that is normally what it is.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 17, 2009 Nov 17, 2009

Thanks for the response, that does help a bit, but I m still wondering if this stuff is written down anywhere?  Maybe it isn't?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 17, 2009 Nov 17, 2009

The nearest official documentation will proberbly be the Javascript Reference Appenddix A : Event ID Codes.

This document should be found C:\Program Files\Adobe\Adobe Photoshop CS4\Scripting\Documents

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 01, 2016 Nov 01, 2016
LATEST

Hi Paul,

Thanks for your answer.

However, it seems that there is almost nothing for PremierePro.

Would you know any way to "shuttle" (left or right) via scripting as we can do it by pressing 'j' (or 'l') keys?

Cheers,

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Nov 17, 2009 Nov 17, 2009

I don't think that there is any documentation that is helpful to script writers. There are some references but like Paul I find it faster to convert to string than look up in a reference.

Two notes to add to Paul's comments.

charIDs are 4 chars in length or padded with spaces until the length == 4.

#Rlt is unitDistance. The values are stored as 'units' where each 'unit' = 1in/72 no matter what the doc resolution. I perfer not to think of the value as pixels

#Pxl is pixelUnit. The values are stored as pixels.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Nov 17, 2009 Nov 17, 2009

There is the file xtools/xlib/PSConstants.js that has all of the known mappings. It is generated from the SDK header files, so it's as close to be complete as I can get it.

In xtools/xlib/stdlib.js, there is the id2char function will will take a type ID and convert it back to a human readable string using the PSConstants tables or the functions provided by PS.

If you want to clean up the ScriptListerner output, try xtools/apps/SLFix.jsx.

You can find xtools here:

     http://sourceforge.net/scm/?type=cvs&group_id=173281

or here:

    http://ps-scripts.cvs.sourceforge.net/viewvc/ps-scripts/xtools/

The current tarball on the site (v1.6) is horribly out of date. I need to build out a fresh one. Using cvs will keep you current.

-X

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 17, 2009 Nov 17, 2009

Thanks everyone who repsonded!

I will try to figure this out from here.  I am certain that I will have a more detailed question when I get to actully writing the script.

I can  feel the power in the JavaScript /Applescript stuff ( I don't use windows so I can't speek to vbscript). I just can't write anything useful yet.

Todd

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Nov 17, 2009 Nov 17, 2009

If you really want to have a look at some Adobe documentation download the Photoshop SDK and look at PITerminology.h

Here is unit section.

#define unitAngle        '#Ang'    // Unit value - base degrees
#define unitDensity        '#Rsl'    // Unit value - base per inch
#define unitDistance    '#Rlt'    // Unit value - base 72ppi
#define unitNone        '#Nne'    // Unit value - coerced.
#define unitPercent        '#Prc'    // Tagged unit value.
#define unitPixels        '#Pxl'    // Tagged unit value.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines