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

Change value sample size

Advocate ,
Dec 26, 2017 Dec 26, 2017

Copy link to clipboard

Copied

I'm having trouble changing sample size values via script

someone kind could help me

Schermata 2017-12-27 alle 08.45.18.png

Thank you

TOPICS
Actions and scripting

Views

2.5K

Translate

Translate

Report

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
Enthusiast ,
Dec 27, 2017 Dec 27, 2017

Copy link to clipboard

Copied

This settings is in Application class:

2017-12-27_150220.jpg

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.

Votes

Translate

Translate

Report

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
Advocate ,
Dec 27, 2017 Dec 27, 2017

Copy link to clipboard

Copied

Jarda Bereza

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);

Votes

Translate

Translate

Report

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
Contributor ,
Jun 26, 2018 Jun 26, 2018

Copy link to clipboard

Copied

I found typo.

"_rif" should be "_ref".

Votes

Translate

Translate

Report

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
Contributor ,
Jun 22, 2018 Jun 22, 2018

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

Votes

Translate

Translate

Report

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
Enthusiast ,
Aug 05, 2018 Aug 05, 2018

Copy link to clipboard

Copied

LATEST

In aplication actionDescriptor is active tool property which is type of enum and here you can find that name of the tool.

Votes

Translate

Translate

Report

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
Enthusiast ,
Dec 27, 2017 Dec 27, 2017

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.

Votes

Translate

Translate

Report

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
Advocate ,
Dec 27, 2017 Dec 27, 2017

Copy link to clipboard

Copied

unfortunately I use photoshop cc2014.

Votes

Translate

Translate

Report

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
Enthusiast ,
Dec 27, 2017 Dec 27, 2017

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.

Votes

Translate

Translate

Report

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
Advocate ,
Dec 27, 2017 Dec 27, 2017

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.

Votes

Translate

Translate

Report

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