Skip navigation

photoshop applescript

561 Views 3 Replies Latest reply: Jun 19, 2012 8:22 PM by Jacques Rioux RSS
LeCastello Calculating status...
Currently Being Moderated
Jun 18, 2012 7:57 PM

Could anybody help me ?

 

What I want to do : I want to run a batch action for every file from a selected folder, creating (or at least pointing to) another folder as a destination.

 

I tried to read the apple scripting reference for photoshop but couldn't make it. There are no samples to figure how it works.

 

That's what I tried without sucess ...

 

"

set pasta_origem to choose folder with prompt "Select original folder:"

set pasta_destino to choose folder with prompt "Select target folder:"

 

tell application "Adobe Photoshop CS4"

    activate

    batch "13 x 19 + sharpen" from "Ações CFotos" from files list of pasta_origem with options destination folder pasta_destino

    error file

    override save

    windows compatible

end tell

"

 

Any help would be really usefull.

 

Tks !

  • Jacques Rioux Level 4 Level 4 (1,925 points)
    Currently Being Moderated
    Jun 19, 2012 6:49 PM (in response to LeCastello)

    Hi,

     

    Here is an example

    -------------------------------------------

    set pasta_origem to choose folder with prompt "Select original folder:"

    set pasta_destino to choose folder with prompt "Select target folder:"

    set fileToLog to (pasta_destino as string) & "Photoshop_Batch_Errors_Log.txt"

     

    tell application "Finder"

          set PhotoshopFiles to document files of pasta_origem as alias list

          if not (exists file fileToLog) then

                make new file at pasta_destino with properties {name:"Photoshop_Batch_Errors_Log.txt"}

          end if

    end tell

    tell application "Adobe Photoshop CS4"

          activate

          batch "13 x 19 + sharpen" from "Ações CFotos" from files PhotoshopFiles with options {destination:folder, destination folder:pasta_destino, error file:alias fileToLog, windows compatible:true, file naming:{document name lower, extension lower}, suppress open:true, override save:true}

    end tell

    -------------------------------------------

     

    Important : override save:true When this option is true, files will be saved to the destination folder only by “save as” steps in the action "13 x 19 + sharpen". If there are no “save” or “save as” steps, no files will be saved, in this case set it to false or remove ,override save:true in options .

  • Jacques Rioux Level 4 Level 4 (1,925 points)
    Currently Being Moderated
    Jun 19, 2012 8:22 PM (in response to LeCastello)

    LeCastello wrote:

    I think we got closer now: I compiled it but when I ran it, it opened the batch dialog without automatically runnig it.

     

    To controls whether or not Photoshop displays dialogs, use "set display dialogs to ....."

    ----------------------------------------------------

    tell application "Adobe Photoshop CS4"

          set display dialogs to never -- never, always or error dialogs

    ----------------------------------------------------

     

     

    LeCastello wrote:

    In the source option it was set "Bridge" (is it all right ?) and no destination folder was set.

     

    Seems that it's not considered the source files list and/or the destination folder.

     

    Yes, this is the normal behavior when using a script.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.