Options

Photoshop CS scripting help

i_worship_the_Kingi_worship_the_King Registered Users Posts: 548 Major grins
edited September 2, 2007 in Finishing School
I've been looking over the documentation for CS2 (I can't find it for CS, does it even support scripting?) trying to create a script to tackle the following task. Basically I work for a student newspaper and no one else really knows even the basics of photoshop other than 'auto' corrections. Since this is better than zero touchup, i'm trying to script 'auto' touchup to all pictures.

Here's what I'd like (love) to do:

1) Input a folder
and then the script...
1) Renames all files in the folder sequentially (1..2..3..4..5..)
2) Perform 'auto' tasks to every file
3) Report back in some way that it's completed.


I have a basic understanding of Java (and JS) and batch commandline tools, so I'd like to keep it to JS. Other than that, the adobe documentation is useless without and API or some other reference I can't seem to find.

Thanks so much guys... & gals :)
~Matt
I make it policy to never let ignorance stand in the way of my opinion. ~Justiceiro

"Your decisions on whether to buy, when to buy and what to buy should depend on careful consideration of your needs primarily, with a little of your wants thrown in for enjoyment, After all photography is a hobby, even for pros."
~Herbert Keppler

Comments

  • Options
    RichardRichard Administrators, Vanilla Admin Posts: 19,937 moderator
    edited September 1, 2007
    I've been looking over the documentation for CS2 (I can't find it for CS, does it even support scripting?) trying to create a script to tackle the following task. Basically I work for a student newspaper and no one else really knows even the basics of photoshop other than 'auto' corrections. Since this is better than zero touchup, i'm trying to script 'auto' touchup to all pictures.

    Here's what I'd like (love) to do:

    1) Input a folder
    and then the script...
    1) Renames all files in the folder sequentially (1..2..3..4..5..)
    2) Perform 'auto' tasks to every file
    3) Report back in some way that it's completed.


    I have a basic understanding of Java (and JS) and batch commandline tools, so I'd like to keep it to JS. Other than that, the adobe documentation is useless without and API or some other reference I can't seem to find.

    Thanks so much guys... & gals :)
    ~Matt

    Hi Matt,

    In my Windows installation of CS2, there are complete scripting APIs in the folder: C:\Program Files\Adobe\Adobe Photoshop CS2\Scripting Guide, including the object reference model. It is not in the online help.

    It sounds like what you are trying to do could be accomplished without scripting. Have you looked at actions and batch automation?

    Regards,
  • Options
    LAB.ratLAB.rat Registered Users Posts: 65 Big grins
    edited September 1, 2007
    If you just have the saved files renamed by the PS batch dialog instead of renaming them first, you can do all of that with Batch and an action.
  • Options
    i_worship_the_Kingi_worship_the_King Registered Users Posts: 548 Major grins
    edited September 1, 2007
    I haven't heard of batch automation, but I'm looking into it now... thanks for the help (any more tips DEFINITELY welcome).
    I make it policy to never let ignorance stand in the way of my opinion. ~Justiceiro

    "Your decisions on whether to buy, when to buy and what to buy should depend on careful consideration of your needs primarily, with a little of your wants thrown in for enjoyment, After all photography is a hobby, even for pros."
    ~Herbert Keppler
  • Options
    LAB.ratLAB.rat Registered Users Posts: 65 Big grins
    edited September 1, 2007
    There are some contra-intuitive options in the batch dialog which you have to know. I believe they are covered here:

    http://www.ronbigelow.com/articles/batch/batch.htm
    http://www.ronbigelow.com/articles/actions-1/actions-1.htm
    http://www.ronbigelow.com/articles/actions-1/actions-2.htm


    If it doesn't work, just try and mark an option the other way round :D

    (and yes, CS1 supports scripting. The day you need real scripting, you go to www.ps-scripts.com/bb/index.php. More batching tools to be found there.)
  • Options
    LAB.ratLAB.rat Registered Users Posts: 65 Big grins
    edited September 1, 2007
    Another useful batching tool is the Image Processor... (now standard under scripts), for CS a seperate script you have to install from this page:
    www.russellbrown.com/tips_tech.html
    Dr. Brown's Image Processor 2.3

    CS2 video: www.radiantvista.com/archive/video_tutorials/13/
    -

    www.sampsonvideos.com/videos/Photoshop/PhotoshopBatch/
    www.sampsonvideos.com/videos/Photoshop/Actions/
  • Options
    BinaryFxBinaryFx Registered Users Posts: 707 Major grins
    edited September 2, 2007
    Matt, as suggested, actions and the application of an action via the file/automate/batch command can do all of this (in theory*).

    *Depending on the 'automated' tasks, one can include a stop in the action for user input/direction for tasks that one can't record via actions.

    One creates the action containing the automated tasks required. Creating an action can be as simple as recording a series of edits and commands applied to a reference image or it can be pre-planned with more care and may include both recorded steps and inserted menu commands etc.

    One then uses the file/automate/batch command to apply this action to a folder or other selection of source files (open docs, selected docs in Bridge etc).

    One can choose file name save options in the batch command and set a method of reporting errors and the text log file will also report the start and end of the batch even when no errors are reported so there is confirmation.

    The 'bible' on actions can be found here in MS Word .doc format (I can't recall if batch is included, the batch command is easier than actions so this should not be a big issue anyway):

    http://www.atncentral.com/Zip_Actions/PhotoshopActions_ver1.1Btoc.zip


    Regards,

    Stephen Marsh.
Sign In or Register to comment.