Copy link to clipboard
Copied
I'm having trouble changing sample size values via script
someone kind could help me
Thank you
Copy link to clipboard
Copied
This settings is in Application class:
So you need to use "set" action.
Reference is "colorSamplerTool" ...this is what you want to set. If you want set colorPicker you need different reference
#include Humanizer-0.2.jsx
// https://github.com/jardicc/ActionManagerHumanizer
var desc = {
"null": {
_ref: "colorSamplerTool"
},
"to": {
_obj: "currentToolOptions",
_value: {
"eyeDropperSample": 2 // possible values: 0,1,2,5,15,25,50
}
}
}
var descMod = Humanizer.objectToDescriptor(desc)[1];
executeAction( stringIDToTypeID( "set" ), descMod, DialogModes.NO );
Humanizer tool is not needed. It can be rewritten into pure action manager code. I have no passion to do that now. Maybe somebody else wants.
Copy link to clipboard
Copied
I tried but it does not work
I downloaded the Humanizer file
and I set this up
where am I wrong?
//// script
#include "Humanizer-0.2.jsx"
var desc = {
"null": {
_rif: "colorSamplerTool"
},
"to": {
_obj: "currentToolOptions",
_value: {
"eyeDropperSample": 1 // possible values: 0,1,2,5,15,25,50
}
}
}
var descMod = Humanizer.objectToDescriptor (desc) [1];
executeAction (stringIDToTypeID ("set"), descMod, DialogModes.NO);
Copy link to clipboard
Copied
I found typo.
"_rif" should be "_ref".
Copy link to clipboard
Copied
Hi Jarda,
Thank you very much for the code and also the library.
I've verified working well on CC 2018.
Could you tell me where the string "colorSamplerTool" came from?
I tried to modify from other your code to work this functionality.
But I could not and still not sure where the string "colorSamplerTool" came from.
Thank you,
Naoki
Copy link to clipboard
Copied
In aplication actionDescriptor is active tool property which is type of enum and here you can find that name of the tool.
Copy link to clipboard
Copied
Could you try it in CC2018 ?
As I see from your screens you don't have new Spectrum UI skin.
Humanizer works since 2015 or 2015.5 I am not sure exactly.
Otherwise you would need to rewrite code into pure Action manager code.
Copy link to clipboard
Copied
unfortunately I use photoshop cc2014.
Copy link to clipboard
Copied
If you pay subscription... which is probably only way how to legaly own Photoshop CC... you can upgrade to any version without any extra fees.
Copy link to clipboard
Copied
Unfortunately I use imac with mountain lion
and I can not put versions above cc2014
I should also update the mac
but I have photo databases and I do not want to lose them.