Scripting Matters

Scripting matters, right?

I think so, but where is all the training? Photoshop has traditionally been spoiled when it comes to good training. Look at any bookshelf and there’s a plethora of books on Photoshop to choose from. There’s lots of Photoshop training sessions out there, too.

So, what’s out there for scripting?

Chandler McWilliams wrote a book called "Adobe Scripting" a few years back which I thought was a great introduction to scripting Photoshop.

Last September’s Photoshop World in Boston featured it’s first session dedicated to scripting – "Photoshop For Geeks" by Matt Kloskowski, a NAPP trainer. Granted the session was from 9pm-10pm, but there were hundreds of people who showed up and were excited by scripting.

Scripting Matters, Inc., from who I stole the title of this post from, is hosting a 5-day seminar called "AppleScript Pro Sessions" in Chicago, IL, October 31st through November 4th. Shane Stanley and Ray Robertson host the session. The sessions will focus on AppleScript, and involve using AppleScript in conjunction with InDesign, Illustrator, and Photoshop.

I would love to go to this event, but I will be in San Jose for work the same week. If anyone attends the event, let me know what you thought of it.

Here’s my call to action: My fellow Photoshop enthusiasts, ask not what scripting can do for you: Ask what you can do for scripting.

The more authors, trainers, and users we have on board the better. Even yours truly posts a scripting tip or tutorial from time to time.

So tell me, what other scripting training have people found out there?

21 Responses to Scripting Matters

  1. Adam Pratt says:

    I’ll be at the Chicago event all week. I’ll keep you posted when it’s over!

  2. heathrowe says:

    Good topic Jeffrey.Also note ‘Adobe Photoshop CS2 Official JavaScript Reference’ by Adobe Systems will be released in a few days. Hope its interesting.

  3. Heathrowe – Good point. I haven’t seen a copy yet. In case people are interested, here’s a link: Adobe Photoshop CS2 Official JavaScript Reference.

  4. My comment is somewhat general but important for this topic. I love scripting and I want to see it succeed. However, we all have to think of ways in which we can make this stuff accessible to a Photoshop User if its really going to catch on. Essentially they need a script to work with and instructions like “Change this here” or something like that. I think thats the only way we can help this stuff take off as it scares away 99% of the people out there. Just my 2 cents anyway :)Hope you’re doing well Jeff.

  5. Jeff! I’ve got a related question: are the two recently released Scripting Resources (for Bridge and Photoshop) released by Adobe Press just printed/bound versions of the available Script Manuals (PDFs), or are they slightly/completely different? Thanks.

  6. Trevor, good to hear from you.I did some nosing around and the Scripting Resources (for Bridge and Photoshop) from Adobe Press are just printed/bound versions of the available Script Manuals (PDFs) that ship with Photoshop and are available on Adobe.com:Photoshop Scripting Documentation.

  7. heathrowe says:

    They say a sucker is born every minute! The scary thing is I was born 37 years ago – I need to snoop around before I get buy happy :)(I’m obviously laughting at myself here) Oh well at least I made the purchase with Amazon gift certificate, no loss on my part.On a side note for you script hungry folks out there PS-Scripts (http://www.ps-scripts.com/bb/) has some nice material to learn from.heathrowe

  8. Thanks very much Jeff. That’s what I suspected. Still handy to have though and I wouldn’t regret the purchase it I were you heathrowe. I may still purchase them just because I don’t want a huge stack of printouts and sometimes it’s just plain easier to have a physical reference.

  9. Trevor, I agree. Plus, I’m sure educators will appreciate them. I also think having a printed version will bring more awareness to Photoshop Scripting. I am always amazed that people don’t know that we ship with scripting documentation, extra sample scripts, the Listener Plug-In, and the ExtendScript Toolkit.Heatrowe, thanks for pointing out PS-Scripts.Adobe’s own Scripting Forum is a good place to get help with scripting as well.

  10. Wade Harrell says:

    The scripting still has quite a few holes as well. For instance in the past 24 hours I have wanted to- Copy a layer mask from one layer to another- Do the same with a vector mask- Replace a JPG in a smart objectAll of which I could not do directly (found work-arounds for the first two)On the flip side I have been able to get a tab delimited export from a database to give me a mapping of 300+ PSD files to products so I could generate images that need to be resized/recomposited and saved as JPEG. Takes about 20 minutes to run and creates 1300 JPEGs. All the product images in the next release of the music.yamaha.com site will be generated via Photoshop scripting. I was even able to generate a text file for re-import into the database ;)Once the scripting DOM is robust enough that a developer can truly do anything (easily) that can be done in Photoshop I think we will see a large amount of growth. It may even come from unexpected places; when scripting was first released I was using it to make abstract animations (think radial gradient fill with a center point shifting over time). There is also a resistance from the “art” world to “techie” programming. Maybe the people to push the scripting on are not the designers but the web developers (like myself) that are already familiar with JavaScript and DOM concepts. Fortunately for me I had also been using PhotoShop since 3.04 so the opportunity to use JavaScript there came as a liberation.

  11. Wade, thanks for the comments. I’ll add a request for more scripting support for layers masks and Smart Objects. I understand your want for replacing a JPEG in a Smart Object.Scripting in Photoshop is definitely accelerating in popularity and the DOM is getting more robust with each release.I’m glad to hear you are having some success and breakthroughs with scripting and your workflows.

  12. Thomas Ruark says:

    Good stuff Jeff.I here a lot of script writers asking for pixel level access. Meaning they want to get and set pixel values in a script. Are we sure on this one? Do you really want to write a for loop in JavaScript? Or should a solution be to give a simple interface at the C API level? How many remember Filter Factory? Is that what you are looking for?Looking for thoughts/comments on this and how you see a script being used as a filter.

  13. Peter says:

    All they would have had to do to make Smart Objects work in the scripting API would be to add a property to the smart object layer referencing the embedded document it represents, and allow you to set app.activeDocument to that reference. As far as I can tell from the debugger, the embedded documents work exactly the same as regular documents. Unfortunately, the only way to set a smart object’s embedded document as the active document is to double-click its layer, which can’t be automated or even done manually during the execution of a script. argh!! Smart Objects would have solved a HUGE production problem for me, but because of this I can’t use them.[Peter, you can choose Layer>Smart Objects> Edit Contents to make the embedded file the app.activeDocument. Here’s the code from the listener that I’ve turned into a function:editContents();function editContents() {var id16 = stringIDToTypeID( “placedLayerEditContents” );var desc5 = new ActionDescriptor();executeAction( id16, desc5, DialogModes.NO );}- Jeff ]

  14. Peter says:

    Whoa, that’s tricky… thanks! I think it might work.[ Peter, great! If people want a tutorial on the scripting listener, I have one on my personal blog here: http://www.tranberry.com/photoshop/photoshop_scripting/tips/listener.html- Jeff ]

  15. Peter says:

    Err… well it does work, but unfortunately what I was trying to do – build up a hierarchical scene graph description of a PSD in XML and spit out the layers as individual PNGs referenced by it – is unworkably slow. As soon as the recursion is a couple layers deep (using nested layer sets), Photoshop bogs down and starts taking up >500MB memory… If I wait long enough, it does finish and the output is correct, but the slowness makes it useless for production purposes. I wonder if Photoshop is making copies of all layers/files referenced in Javascript or something.[ Peter, do you want to send me a script? We could take a look at what might be going wrong for you.- Jjtranber at Adobe ]

  16. Yeah, for a lot of us who are so advanced in this type of programing this is more than a little difficult. It would be nice to see some more tutorials on scripting.

  17. Mike Hale says:

    Peter,If you still need to work with smart objects, I have a set of 5 functions for creating/replacing/exporting smart objects.I also have a method for traversing nested layers that uses scriptlistner/action manager code and is very fast.Let me know if you still needs these.-Mike

  18. MooMan says:

    Hi,I’m looking at scripting too and these smart object functions would be really useful. Could you post these?I’m having a littler problem setting the activeLayer.. i specify the name of the layer but its not selecting it – any idea? the layer is a smart object, to which i tried the open smart object script above and that worked… now to figure out how to select the right layer .. ahhhh!

  19. Mike Hale says:

    MooMan,If you go to PS-Scripts (click on my name) I’ll be glad to post the functions and help you use them all that I can.Mike

  20. Thank you for any other informative web site. Where else may just I get that kind of information written in such an ideal approach? I have a mission that I am just now working on, and I’ve been at the look out for such info.king Regards Anette

  21. Wow, I was having a really bad day today, and when I read this post and everyone’s comments, it made me laugh out loud several times over. Thanks :).

Leave a Reply

Your email address will not be published. Required fields are marked *