Skip navigation
OzSanta2
Currently Being Moderated

Requesting help regarding 'Batch' script

Jul 31, 2012 4:26 PM

Tags: #batch #applescript #photoshop_cs5 #extended #photoshop_cs6

G'day

 

Elsewhere in this forum I posted a script using the Photoshop 'Batch' command.

 

Trouble is, it won't work  under PS CS5 or CS6 extended trial. and gives the following error for both...

 

Screen Shot 2012-08-01 at 9.00.32 AM.png

 

My script is...

 

on adding folder items to this_folder after receiving PhotoshopFiles

          try

                    set ptd to path to desktop as text

  --set ptdpp to ptd & "Photoshop Processing" as text

                    set ptdpp to this_folder as text

                    set ptdpif to ptd & "Processed Images Folder" as text

                    set ptdpsf to ptd & "Processed Stored Folder" as text

                    set fileToLog to (ptdpif) & ":Photoshop_Batch_Errors_Log.txt" as text

                    tell application "Finder"

 

                              if not (exists folder ptdpsf) then

                                        make new folder at folder ptd with properties {name:"Processed Stored Folder"}

                              end if

                              if not (exists folder ptdpif) then

                                        make new folder at folder ptd with properties {name:"Processed Images Folder"}

                              end if

                              if not (exists file fileToLog) then

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

                              end if

                              set PhotoshopFiles to files of folder ptdpp as alias list

 

                    end tell

  say (count of PhotoshopFiles)

 

                    tell application "Adobe Photoshop CS5"

  activate

                              set display dialogs to never

  batch "Wood Frame - 50 pixel" from "Default Actions" from files PhotoshopFiles with options {destination:folder, destination folder:alias ptdpif, error file:alias fileToLog, macintosh compatible:true, file naming:{document name mixed, extension lower}, suppress open:true, override save:true}

                    end tell

 

                    tell application "Finder"

  move PhotoshopFiles to folder ptdpsf

                    end tell

          on error errmsg

  display dialog errmsg

          end try

 

end adding folder items to

 

 

Am I coding the Batch command correctly please?

 

Regards

 

Santa

 
Replies
  • JJMack
    3,411 posts
    Jan 9, 2006
    Currently Being Moderated
    Aug 1, 2012 5:24 AM   in reply to OzSanta2

    OzSanta2 wrote:

     

    G'day

     

    Elsewhere in this forum I posted a script using the Photoshop 'Batch' command.

     

    Trouble is, it won't work  under PS CS5 or CS6 extended trial. and gives the following error for both...

     

    Screen Shot 2012-08-01 at 9.00.32 AM.png

     

    My script is...

     

    Am I coding the Batch command correctly please?

     

     

    The Automate Batch Command batches an actiom which I assume you created and it in turn uses your script. You get that message during the batch command. However you give us no clue as to when you get that message  have images file been open or saved or how you setup the batch dialog to run your action that uses your apple script.  I myself use a pc.  You may want to try putting some alerts in you script to see if you can narrow the problen down to some section in your script.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points