• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: PS CS art layer solid fill
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PS CS art layer solid fill


  • Subject: Re: PS CS art layer solid fill
  • From: Natalie Lambert <email@hidden>
  • Date: Fri, 19 Jan 2007 07:41:15 -0800 (PST)

Thanks for the help with this!!! I don't have time to
learn javascript before I need to have this project
done! I'll put that on my list for next week!

one more question... how hard is this to convert this
to cmyk values?


natalie
email@hidden

set newLayer to makeSolidColorFillLayer(25, 150, 100)
-- rgb values

on makeSolidColorFillLayer(redVal, grnVal, bluVal)
    tell application "Adobe Photoshop CS"
        do _javascript_ ("function
newSolidColorFillLayer( myL, myA, myB )
        {
        var layerTypeRef = new ActionReference();
            layerTypeRef.putClass( stringIDToTypeID(
\"contentLayer\" )  );
        var newFillLayer = new ActionDescriptor();
            newFillLayer.putReference( charIDToTypeID(
\"null\" ) , layerTypeRef );
        var colorValues = new ActionDescriptor();
            colorValues.putDouble( charIDToTypeID(
\"Rd  \" ) , " & redVal & " );
            colorValues.putDouble( charIDToTypeID(
\"Grn \" ) , " & grnVal & " );
            colorValues.putDouble( charIDToTypeID(
\"Bl  \" ) , " & bluVal & " );
        var rgbColor = new ActionDescriptor();
            rgbColor.putObject( charIDToTypeID( \"Clr
\" ) , charIDToTypeID( \"RGBC\" ) , colorValues );
        var fillType = new ActionDescriptor();
            fillType.putObject( charIDToTypeID(
\"Type\" ) , stringIDToTypeID( \"solidColorLayer\" ) ,
rgbColor );
        newFillLayer.putObject( charIDToTypeID(
\"Usng\" ) , stringIDToTypeID( \"contentLayer\" ) ,
fillType );
        executeAction( charIDToTypeID( \"Mk  \" ) ,
newFillLayer, DialogModes.NO );
        }
        newSolidColorFillLayer( arguments[0] ,
arguments[1] , arguments[2] );") ¬
            with arguments {redVal, grnVal, bluVal}
        return name of current layer of current
document
   end tell
end makeSolidColorFillLayer



____________________________________________________________________________________
Any questions? Get answers on any topic at www.Answers.yahoo.com.  Try it now.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: PS CS art layer solid fill
      • From: Martin Orpen <email@hidden>
  • Prev by Date: Slow Repeating Loop
  • Next by Date: Re: PS CS art layer solid fill
  • Previous by thread: Re: PS CS art layer solid fill
  • Next by thread: Re: PS CS art layer solid fill
  • Index(es):
    • Date
    • Thread