Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.