-2

I have found an illustrator script which i want to use in photoshop as both softwares are made by same company there wont be any problems given some minor changes. I want to convert the object method in illustrator to selection method in photoshop but i could not find any proper references of it in photoshop scripting documentations, any help will be appreciated. I am using extend script for debugging and writing code.

function getDefFill(){
 defObj = activeDocument.selection;
 if (defObj.typename == "SpotColor")
 {
  defObj = activeDocument.defaultFillColor.spot.color;
 }
 if(defObj.typename=="RGBColor"){
  return(defObj.red+","+defObj.green+","+defObj.blue);
 }
 else
 if(defObj.typename=="CMYKColor"){
   return( defObj.cyan+","+defObj.magenta+","+defObj.yellow+","+defObj.black);
 }
  else{
   alert(defObj.typename+" not understood");
   return ("0,0,0,0");}
}
Ambriel
  • 1
  • 1

1 Answers1

0

You can go through the photoshop scripting documentation from the following links.

https://www.adobe.com/devnet/photoshop/scripting.html

This link have all latest documentations in JavaScript, AppleScript and VBScript.

I hope this helps you understand that Illustrator and Photoshop tools are different and they work in a different way.

Charu Rajput
  • 653
  • 3
  • 15