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

How to use script to set clone Stamp Tool options?

Explorer ,
Aug 10, 2020 Aug 10, 2020

Copy link to clipboard

Copied

How to use script to set clone Stamp Tool options?

 

I tried to use the following code, but it didn't work

 

var r = new ActionReference(); 

r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("tool")); 

r.putEnumerated(stringIDToTypeID("application"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum")); 

var options = executeActionGet(r).getObjectValue(stringIDToTypeID("currentToolOptions"));           

var d1 = new ActionDescriptor(); 

d1.putBoolean(charIDToTypeID('Algd'), true);

options.putObject(stringIDToTypeID("cloneStampTool"), stringIDToTypeID("cloneStampTool"), d1); 

var r = new ActionReference(); 

r.putClass(stringIDToTypeID("cloneStampTool")); 

var d = new ActionDescriptor(); 

d.putReference(stringIDToTypeID("null"), r); 

d.putObject(stringIDToTypeID("to"), stringIDToTypeID("null"), options); 

executeAction(stringIDToTypeID("set"), d, DialogModes.NO); 
TOPICS
Actions and scripting

Views

185

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
no replies

Have something to add?

Join the conversation
Adobe