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

How to fix "Error 8500: The requested property does not exist"?

Engaged ,
Jun 13, 2023 Jun 13, 2023

When i run following script on attached png sample file: 

https://drive.google.com/file/d/1aYQTyKwc2xkRtkq9VOe2Fimhw4GlshEm

i get following error: 

photo_2023-06-13_22-23-47.jpg 

How to fix this error? 

Note that this script was not written by me and written by one of the users of this community. The script runs on that user's system without any problems, but it gives an error on my system and others. 

Note that to test the script, it must be executed on the attached PNG sample file. 

TOPICS
Actions and scripting
497
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
Adobe
People's Champ ,
Jun 13, 2023 Jun 13, 2023
Turn off default mask creation on adjustment layers
 
or modify histogram() function like this:
 

 

////// get histogram //////
function histogram () {

/////////////////
////// select the composite channel as the active channel. the current one can be a mask.
/////////////////
var d = new ActionDescriptor();
var r = new ActionReference();
r.putEnumerated(stringIDToTypeID("channel"), stringIDToTypeID("channel"), stringIDToTypeID("RGB"));
d.putReference(stringIDToTypeID("null"), r);
d.putBoolean(stringIDToTypeID("makeVisible"), false);
executeAction(stringIDToTypeID("select"), d, DialogModes.NO);
/////////////////
/////////////////

var ref = new ActionReference();
ref.putProperty (stringIDToTypeID ("property"), stringIDToTypeID ("histogram"));
ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var docDesc = executeActionGet(ref);
var list = docDesc.getList(stringIDToTypeID("histogram"));
var theArray = new Array;
var theTotal = 0;
for (var i = 0; i < list.count; i++) {
var d = list.getInteger(i);
theArray.push(d);
theTotal = theTotal+d;
};
return [theArray, theTotal];
};

 

 
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
Engaged ,
Jun 13, 2023 Jun 13, 2023
LATEST
quote
modify histogram() function like this:
 

By @r-bin

tnq very much it worked for me by modify script

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