Skip to main content
namodayab94056659
Known Participant
March 29, 2018
Question

Get the direct implementation of stringIDToTypeID

  • March 29, 2018
  • 1 reply
  • 964 views

I have found the implementation for charIDToTypeID as follows,

var charIDToTypeID = function(s) {

   var val = 0;

   val += s.charCodeAt(0) * 256 * 256 * 256;

   val += s.charCodeAt(1) * 256 * 256;

   val += s.charCodeAt(2) * 256;

   val += s.charCodeAt(3);

   return val;

};

When I send charIDToTypeID('Mk  '), it return correct id of current event.

Same way I want to get function definition for stringIDToTypeID. When I send stringIDToTypeID("makeTimeline"), to return correct ID of current.

Is there any direct implementation to get it?

I used Photoshop CC 2014, 2015 and 2017.

This topic has been closed for replies.

1 reply

Jarda Bereza
Inspiring
March 29, 2018

CharID is always same but stringID might be same but also might be dynamic. Depends if stringID has charID equivalent. Photoshop has list of stringIDs and it assign number after each request for unlisted ID... from zero to integer limit. After Photoshop start are ~3000IDs assigned.