1 2 Previous Next 79 Replies Latest reply on Nov 13, 2014 1:04 PM by GuyJr Go to original post
      • 40. Re: Changes to Photoshop CS5 and Applescript
        EdgeparkKen Level 1

        I have a somewhat complex script that is performing a repeat and I don't understand why CS5 is broken on it.

         

        tell application "Finder"
            -- make an item list from your identified folder
            set itemList to files in raw_folder
        end tell

         

        -- create a repeat that takes each file from the item list and do something
        repeat with i from 1 to count of items of itemList
            tell application "Finder"
                set fileName to item i of itemList as alias
                --set itemPath to raw_folder & fileName
            end tell

         

            tell application "Adobe Photoshop CS5"
                set display dialogs to never
               
                activate
                open fileName

         

        ScriptDebugger is reporting at this point the script starts. I have tried changing the last line to

        open alias fileName but it still stops.

         

        Is there really broken script communication between PSCS5 and OSX?

        • 41. Re: Changes to Photoshop CS5 and Applescript
          JonLo-VBovw0 Adobe Employee

          This is an example of dealing with the alias problem:

           

          set appFolder to path to applications folder as string
          set myPath to appFolder & "Adobe Photoshop CS5:Samples:"
          tell application "Finder" to set fileList to name of files of folder myPath
          set fileNum to count items of fileList

           

          tell application "Adobe Photoshop CS5"
              activate
              set display dialogs to never
              repeat with i from 1 to fileNum
                  open alias (myPath & item i of fileList)
              end repeat
          end tell

           

          The key is to coerce/cast the alias as "string" then in Photoshop coercing/casting it back to alias.

           

          In your example, if you change the following lines, it should work for you:

           

          In Finder:

          set fileName to item i of itemList as alias => set fileName to (item i of itemList) as string

           

          in Photoshop:

          open fileName => open alias fileName

          • 43. Re: Changes to Photoshop CS5 and Applescript
            thomas.thielke

            Please also send me the patch plug in.

            tom dot thielke at qg dot com.

             

            Thanks!

            • 44. Re: Changes to Photoshop CS5 and Applescript
              arrowstotle Level 1

              The plugin would be most helpful here too.

              Please send to: arrowstotle    mac dot com.

              Thanks in advance.

              • 45. Re: Changes to Photoshop CS5 and Applescript
                leo.r Level 1

                Hi Jesper,

                 

                Thanks for releasing the fixed plug-in.

                 

                Could you please send me a copy to support at zevrix dott com.

                 

                Do you know when the fixed plug-in will be incorporated with Photoshop?

                 

                One of Zevrix products, LinkOptimizer, relies on AppleScript interaction with Photoshop. Several users reported this problem and I'd like to have some more specific info for them, if possible. Although it looks like this problem is quite rare.

                 

                Thanks,

                 

                Leo Revzin

                Zevrix Solutions

                http://zevrix.com

                • 46. Re: Changes to Photoshop CS5 and Applescript
                  SuperMacGuy Level 2

                  Jesper, are you an Adobe employee? Is this an official patch?

                  • 47. Re: Changes to Photoshop CS5 and Applescript
                    Meredith Payne Stotzner Adobe Employee

                    For people who got the updated Scripting Support plug-in from Jesper: In case you did not see the memo...

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

                    Subject: IMPORTANT: Plug-ins to replace before running the Photoshop 12.0.1 live patch

                    Dear Photoshop customer,

                    You have been identified as someone who may have replaced plug-ins that were not in the 12.0 shipping version of Photoshop. In order to run the 12.0.1 patch that will be released later tonight at 9pm PST, you will need to replace the 12.0.1 beta versions with the 12.0 versions of the plugins. Here are the 3 plugins that are known to be affected:

                    • Liquify
                    • MultiProcessor Support
                    • ScriptingSupport


                    Here are the full paths for each plugin:

                    Adobe Photoshop CS5/Plug-Ins/Extensions/MultiProcessor Support.plugin
                    Adobe Photoshop CS5/Plug-Ins/Extensions/ScriptingSupport.plugin
                    Adobe Photoshop CS5/Plug-Ins/Filters/Liquify.plugin

                    *Note: you only need to replace the beta version of the plugin you were given (not all three plugins)*


                    Once you have replaced these files, you will be able to successfully run the 12.0.1 patch installer via Help > Updates.

                    If you have forwarded beta versions of these plugins to anyone else, please also forward this email so they can successfully run the patch.

                    Barry Young
                    Quality Engineering Manager, Photoshop

                    ------ End of Forwarded Message

                     

                     

                    I've attached the 12.0 ScriptingSupport plug-in, in case you do not have the original.

                    Thanks for your help!
                    Meredith

                    • 48. Re: Changes to Photoshop CS5 and Applescript
                      panelson

                      I have successfully upgraded the scripting support plugin to v12.0.1 when I upgraded Photoshop. I am still having problems with several scripts that worked fine in CS4. I cannot get Photoshop to open a document either using an alias or the POSIX path.

                       

                      This is a sample path that I have assigned to the variable, theimage: "Hard Drive/Users/alex/Pictures/Thumbnails/PAN_20070112_6237_thumb.jpg"

                       

                      and here is the code that I am using to open the document:

                       

                      tell application "Adobe Photoshop CS5"

                       

                      activate

                      open theimage showing dialogs never

                       

                      set docRef to current document

                      set ruler units of settings to inch units

                      set theheight to the height of the current document

                      set thewidth to the width of the current document

                      set theres to the resolution of the current document

                       

                      end tell

                       

                      The line, "open theimage..." fails to open the document in Photoshop, and when the next line, "set docRef..." executes, I get the error: "Adobe Photoshop CS5 got an error: Can’t get current document." since the doc was not opened in the first place.

                       

                      Is anyone successfully opening documents via AppleScript using PS CS5 v12.0.1, and if so, would you mind sharing the code with me?

                      • 49. Re: Changes to Photoshop CS5 and Applescript
                        arrowstotle Level 1

                        I've found a problem with the ScriptingSupport plugin as part of the 12.01 update:

                         

                        Macs  in Snow leopard(10.6.3 or 4) running CS5 12.01 in 64 bit mode work reliably running scripts.

                        Macs in Leopard(10.5.8) running CS5 12.01 in 64 bit mode frequently fail to be able to run scripts reporting "unable to open image", as though the scriptngsupport.plugin had not been updated. I have confirmed that the plugin is version 12.01. This can be reproduced across a number of CS5 installs/Macs.

                         

                        The solution has been to switch CS5 to 32 bit mode(file/ get info) and the errors stop.

                        • 50. Re: Changes to Photoshop CS5 and Applescript
                          panelson Level 1

                          I'm running Mac OSX 10.6.4 and Photoshop 12.0.1 with the latest Scripting Support plugin. I have tried running AppleScripts with Photoshop in both 32 and 64 bit modes, and in both cases Photoshop was not able to execute a simple open command. The script that I am running is one that I have been successfully using for years with previous versions of Photoshop. Clearly there is still something that is broken with Photoshop CS5's support for AppleScript.

                           

                          I am wondering if Adobe is going to address the issue at some point very soon, since PS CS5 has broken my production workflow???

                          • 51. Re: Changes to Photoshop CS5 and Applescript
                            JonLo-VBovw0 Adobe Employee

                            If you change your path to the Finder's path format like "Hard Drive:Users:alex:Pictures:Thumbnails:PAN_20070112_6237_thumb.jpg" and change the open command as "open alias theimage showing dialogs never", your script should work fine.

                             

                            Another solution is taking out "Hard Drive" from your path, i.e. "/Users/alex/Pictures/Thumbnails/PAN_20070112_6237_thumb.jpg" and use the command "open alias theimage showing dialogs never". This is the correct POSIX path of your image file.

                             

                            Let me know if you still have problem in opening the images.

                            • 52. Re: Changes to Photoshop CS5 and Applescript
                              JonLo-VBovw0 Adobe Employee

                              Could you please post an example here? Thanks in advance.

                              • 53. Re: Changes to Photoshop CS5 and Applescript
                                panelson Level 1

                                Thanks Jon, I now see the error in my script (and I was convinced that it was Photoshop's fault).

                                • 54. Re: Changes to Photoshop CS5 and Applescript
                                  Peter Payne

                                  Hi, I am the original poster and it's funny that to do this day, doing a Google search on Applescript problems with CS5 brings up my post (I am honored). I'd like to tell Adobe in no uncertain terms the poor attention to Applescript cost them about 10 potential CS5 upgrades, and if CS6 continues to have broken scripts, without the ability to even tell the current document to do something, you will probably lose a customer for like (or, I'll stay at CS3 for the remainder of my company's lifespan). If I need to totalyl rework all my scripting from the ground up I'll find another tool to based my business around.

                                  • 55. Re: Changes to Photoshop CS5 and Applescript
                                    JonLo-VBovw0 Adobe Employee

                                    Peter, could you please give us an example to show the problems you encountered? Thanks a lot.

                                    • 56. Re: Changes to Photoshop CS5 and Applescript
                                      mnp13 Level 1

                                      I am having a somewhat similar problem. I have a script that worked perfectly in CS4, except for the limitations of CS4 with printing. I have upgraded to the trial version of CS5 because supposedly the actions in CS5 record printing preferences. The following script worked PERFECTLY in CS4. Now when I run it in CS5 I get an error "Photoshop CS5.1 has an error: file some object wasn't found."

                                       

                                      I didn't change ANYTHING in the script except for telling it to use CS5 instead of CS4, and the name of the action (because I made a new one in CS5)

                                       

                                      on adding folder items to this_folder after receiving these_items
                                           
                                           try
                                                tell application "Finder"
                                                     repeat with i from 1 to number of items in these_items
                                                          try
                                                               set this_item to item i of these_items
                                                               
                                                               tell application "Adobe Photoshop CS5.1"
                                                                    open this_item
                                                                    do action "deskjet9800" from "photobooth"
                                                                    
                                                               end tell
                                                          on error error_message
                                                               tell application "Finder"
                                                                    display dialog "Error for item " & (this_item as string) ¬
                                                                         & ": " & error_message buttons {"Continue", "Cancel"} ¬
                                                                         default button 1 giving up after 120
                                                               end tell
                                                          end try
                                                     end repeat
                                                end tell
                                           on error error_message
                                                tell application "Finder"
                                                     display dialog error_message buttons {"Cancel"} ¬
                                                          default button 1 giving up after 120
                                                end tell
                                           end try
                                           
                                      end adding folder items to
                                      

                                       

                                      Any help would be greatly appreciated. This is REALLY frusterating!!!

                                       

                                      Oh, and I'm on a Mac, 10.5.8, with Photoshop CS5 12.1 x64

                                       

                                      And I do have the scripting plug in in the automate folder.

                                       

                                      And I tried removing the "do action" line, to see if Photoshop would just open the image, and got the same error.

                                       

                                      Michelle

                                      • 57. Re: Changes to Photoshop CS5 and Applescript
                                        mnp13 Level 1

                                        Ok, I kept on digging after I posted, and I actually solved my own problem, so I thought I would share it with you.

                                         

                                        on adding folder items to this_folder after receiving these_items
                                             
                                             try
                                                  tell application "Finder"
                                                       repeat with i from 1 to number of items in these_items
                                                            try
                                                                 set this_item to item i of these_items
                                                                 
                                                                 
                                                                 -- Coerce each alias to string
                                                                 set this_item to this_item as string
                                                                 
                                                                 tell application "Adobe Photoshop CS5.1"
                                                                      
                                                                      open alias this_item showing dialogs never
                                                                      
                                                                      do action "deskjet9800" from "photobooth"
                                                                      
                                                                      
                                                                 end tell
                                                            on error error_message
                                                                 tell application "Finder"
                                                                      display dialog "Error for item " & (this_item as string) ¬
                                                                           & ": " & error_message buttons {"Continue", "Cancel"} ¬
                                                                           default button 1 giving up after 120
                                                                 end tell
                                                            end try
                                                       end repeat
                                                  end tell
                                             on error error_message
                                                  tell application "Finder"
                                                       display dialog error_message buttons {"Cancel"} ¬
                                                            default button 1 giving up after 120
                                                  end tell
                                             end try
                                             
                                        end adding folder items to
                                        

                                         

                                        I also changed the CS5 preferences to open in 32 bit mode, because somewhere, someone said to do that. And now it's working, so I'm just going to leave it that way!

                                         

                                        In case anyone is wondering, this is a home made photobooth that I'm making for my wedding. The action that PS5 is calling opens the file, scales it to 5 inches wide, then crops it to 7 inches tall, then saves and prints the image. It then opens another file, copy and pastes a "frame" onto the image (that says thanks for coming, and has the wedding date), then saves it to a different folder, and prints a second copy for them to take home with them. Then closes all of the images and waits for the next one.

                                         

                                        Not all that complicated really, and saved me $1000 in photobooth rental fees. Sure, it's costing me paper and ink, and the supplies to build the booth itself ($50 in PVC pipe and connectors, I'm borrowing the fabric), but I'm out about $100 at this point, I learned a lot about scripting and I have the satisfaction of doing it myself!!! lol

                                         

                                        THANKS!

                                         

                                        Michelle

                                        • 58. Re: Changes to Photoshop CS5 and Applescript
                                          JonLo-VBovw0 Adobe Employee

                                          Thank you, Michelle, for the sharing. It must be a wonderful accomplishment to do it all by yourself. The key change you made from the original script is

                                          set this_item to this_item as string

                                          By adding this line, "this_item" became a string from a "Finder" alias, you then cast/coerce it back to a "Photoshop" alias through "open alias". Great job!!

                                          • 59. Re: Changes to Photoshop CS5 and Applescript
                                            tomdev

                                            All these different ways of representing file references, what a mess! And a pain to script.

                                            • 60. Re: Changes to Photoshop CS5 and Applescript
                                              panelson Level 1

                                              --I found that using the following to choose a file from a standard open dialog box...

                                               

                                              property theimage : missing value

                                              --open an image file

                                              --check to see if the image is referenced or missing

                                              if theimage is missing value then

                                              set theimage to choose file of type {"JPEG", "TIFF"}

                                              set theimage to theimage as string

                                              end if

                                               

                                              --and then adding the following line solved the problem.

                                               

                                              open alias theimage showing dialogs never

                                               

                                              I think I wasted a couple of hours trying to figure this out with posts and help from people on this forum (thank you). But what a waste. None of us should have had to go through this.

                                              • 61. Re: Changes to Photoshop CS5 and Applescript
                                                mnp13 Level 1

                                                JonLo wrote:

                                                 

                                                Thank you, Michelle, for the sharing. It must be a wonderful accomplishment to do it all by yourself. The key change you made from the original script is

                                                set this_item to this_item as string

                                                By adding this line, "this_item" became a string from a "Finder" alias, you then cast/coerce it back to a "Photoshop" alias through "open alias". Great job!!

                                                 

                                                THANKS!

                                                 

                                                I wanted to be sure to share what was working, because soooo often there are threads on forums that say "I have this problem and can't figure it out" (and I'm having the exact same problem) then a few posts later, there is one that says "I got it working, thanks!" but they never share what they did...

                                                 

                                                So hopefully, my success will help someone else in the future!

                                                • 62. Re: Changes to Photoshop CS5 and Applescript
                                                  JonLo-VBovw0 Adobe Employee

                                                  Basically you can cast/coerce a string into a known type/class in Photoshop, here we use "open alias". "alias" is casting/coercing the string followed into an alias, then using "open" command to open the file. You could use "open file" to achieve the same goal, while in this case the string is casting as a "file".

                                                   

                                                  This give you the flexibility to manipulate the path to open the alias/file.

                                                  • 63. Re: Changes to Photoshop CS5 and Applescript
                                                    sport44

                                                    Hey JonLo.  I have a serious issue.  I've gone through endless forums and I'm either too thick to comprehend my issue or there's a serious scripting bug.  I want to open a dynamic filepath.  For instance, it will be at Users:folder:folder1 once, but accessed in a differnet folder the next time. Script:

                                                     

                                                     

                                                     

                                                    tell application "Finder"

                                                    set locationLogoPackage to (choose folder with prompt "Please locate your LOGO PACKAGE folder") as alias

                                                     

                                                    set folderPrimary to make new folder at locationLogoPackage with properties {name:"Primary"}

                                                     

                                                    set folderPDF to make new folder at folderPrimary with properties {name:"pdf"}

                                                     

                                                    set folderTIF to make new folder at folderPrimary with properties {name:"tif"}

                                                     

                                                    set folderPDF to (folderPDF) as alias

                                                     

                                                    set folderTIF to (folderTIF) as alias

                                                     

                                                     

                                                    tell "Finder"

                                                    set filePDF to files in folderPDF

                                                    set filePDF to (filePDF) as string

                                                    end tell

                                                     

                                                     

                                                     

                                                    tell application "Adobe Photoshop CS5"

                                                    open alias filePDF

                                                    save current document in (folderTIF) as TIFF without options

                                                    close current document saving no

                                                    end tell

                                                     

                                                     

                                                    however it works with a definite file path =(...

                                                     

                                                     

                                                    tell application "Finder"

                                                    set locationLogoPackage to (choose folder with prompt "Please locate your LOGO PACKAGE folder") as alias

                                                     

                                                    set folderPrimary to make new folder at locationLogoPackage with properties {name:"Primary"}

                                                     

                                                    set folderPDF to make new folder at folderPrimary with properties {name:"pdf"}

                                                     

                                                    set folderTIF to make new folder at folderPrimary with properties {name:"tif"}

                                                     

                                                    set folderPDF to (folderPDF) as alias

                                                     

                                                    set folderTIF to (folderTIF) as alias

                                                     

                                                     

                                                    tell application "Finder"

                                                    set filePDF to "500gig:Users:wyatt:Desktop:logo_package:Primary:pdf:testAi.pdf" as string

                                                    end tell

                                                     

                                                     

                                                     

                                                    tell application "Adobe Photoshop CS5"

                                                    open alias filePDF

                                                    save current document in ("500gig:Users:user1:Desktop:logo_package:Primary:tif") as TIFF without options

                                                    close current document saving no

                                                    end tell

                                                    • 64. Re: Changes to Photoshop CS5 and Applescript
                                                      JonLo-VBovw0 Adobe Employee

                                                      Hi there,

                                                       

                                                      I think your example of definite file path is correct. So the problem is how to get a list of files into a list of strings.

                                                       

                                                      Under Finder, you

                                                           set filePDF to files in folderPDF     -- you get a list of files (file object)

                                                           set filePDF to (filePDF) as string     -- you get a single string of the list of files you got from previous line

                                                       

                                                      So, how can you get a list of strings?

                                                           set myFolder to folderPDF as string     -- you get the path to your PDF folder as string

                                                           set tifFolder to folderTIF as string          -- you get the path to your TIF folder as string

                                                           tell application "Finder"

                                                                set fileList to name of files of folderPDF     -- you get every filename in that folder which is text/string

                                                           end tell

                                                       

                                                           repeat with filename in fileList

                                                                set myFile to myFolder & filename          -- now you get the full path to the file as string

                                                                -- then you could treat it like a single file

                                                                tell application "Adobe Photoshop CS5"

                                                                     open alias myFile

                                                                     save current document in (tifFolder) as TIFF without options

                                                                     close current document saving no

                                                                end tell

                                                           end repeat

                                                       

                                                      Let me know if you hit any problem.

                                                      • 65. Re: Changes to Photoshop CS5 and Applescript
                                                        AlbumMan

                                                        Hi I am having problems with this appleScript

                                                         

                                                          tell application "adobe photoshop CS5.1

                                                          activate

                                                          set myRes to 300 as number

                                                          set myW to 900 as number

                                                          set myH to 900 as number

                                                          set myPath1 to alias "scriptPath:openPhotoShopDoc.js"

                                                          do javaScript myPath1 with arguments {"Tif ", "side 1", myW, myH, myRes}

                                                          end tell

                                                         

                                                        It worked fine in CS4

                                                        Please send this patch to me also:

                                                        colin at versatile albums dot com

                                                        Hopefully it will solve my problem also.

                                                        Regards

                                                        AlbumMan

                                                        • 66. Re: Changes to Photoshop CS5 and Applescript
                                                          JonLo-VBovw0 Adobe Employee

                                                          Hi AlbumMan,

                                                           

                                                          If you are using CS5.1 then you have the latest ScriptingSupport plug-in.

                                                           

                                                          As for the script, since I don't know what's in you Javascript, openPhotoShopDoc.js, I can't comment on that. But on the AppleScript side, it seems OK. Could you give me an example of your JS? TIA.

                                                          • 67. Re: Changes to Photoshop CS5 and Applescript
                                                            AlbumMan Level 1

                                                            You may find this a bit confusing, but the details of the appleScript and the javaScript that follows are both created from variables entered within a Director Mx2004 movie.

                                                            The javaScript is then placed in a known location and that is passed to Photoshop

                                                            The appleScript is run by a Director Xtra command.

                                                             

                                                            This is the javaScript.

                                                            // remember current unit settings and then set units to units used by script

                                                            var originalUnit = preferences.rulerUnits;

                                                            preferences.rulerUnits = Units.PIXELS;

                                                             

                                                            // Close any open documents

                                                            while (app.documents.length > 0) {

                                                            app.activeDocument.close()

                                                            }

                                                             

                                                            // Get size for new Document

                                                            var mattW = arguments[2];

                                                            var mattH = arguments[3];

                                                             

                                                            // Create new page document

                                                            var docRef1 = app.documents.add(mattW,mattH,arguments[4],arguments[1],NewDocumentMode.RGB,DocumentFill. WHITE);

                                                             

                                                            // restore original ruler settings

                                                            app.preferences.rulerUnits = originalUnit;

                                                            • 68. Re: Changes to Photoshop CS5 and Applescript
                                                              JonLo-VBovw0 Adobe Employee

                                                              Hi AlbumMan,

                                                               

                                                              I did not see any problem of the JavaScript, either. I can run the AppleScript to kick off the Javascript without problem. The only problem I encountered is "NewDocumentMo de.RGB". There is an extra space in between "Mo" & "de". Please let me know if you still have problem, and the error message you got.

                                                              • 69. Re: Changes to Photoshop CS5 and Applescript
                                                                AlbumMan Level 1

                                                                JonLo

                                                                The space in the script is just an unintentional line break during copy and pasting.

                                                                 

                                                                Very strange. Tried to run the script with just 1 small image and it worked fine. But only once!

                                                                Tried again with a larger image and it failed.

                                                                Tried again with Photoshop already open and it failed on both attempts.

                                                                Here is the message recieved:

                                                                error screen.jpg

                                                                I am recieving complaints from my Italian clients.

                                                                So as you can see it is an Italian version. I am testing in this language for my clients.

                                                                Also I should mention that it is a 30 day trial version as I only have CS4 on my system.

                                                                It is version 12.1 extended

                                                                Regards

                                                                AlbumMan

                                                                • 70. Re: Changes to Photoshop CS5 and Applescript
                                                                  JonLo-VBovw0 Adobe Employee

                                                                  This error is from JavaScript, and the only command you show here is "app.documents.add()", which is an essential function and should not have any problem. I could not reproduce the error even with a loop of many iterations calling from AppleScript.

                                                                   

                                                                  On the AppleScript front, it will be more safe to change your script as follows:

                                                                  set myPath1 to "scriptPath:openPhotoShopDoc.js"

                                                                  do javaScript alias myPath1 with arguments {"Tif ", "side 1", myW, myH, myRes}

                                                                   

                                                                  But, if you could run the JavaScript, then it's not the issue. You might want to dig into your JavaScript to see which line caused the error to pop up.

                                                                  • 71. Re: Changes to Photoshop CS5 and Applescript
                                                                    AlbumMan Level 1

                                                                    JonLo

                                                                    That works fine. Just move the word "Alias" and it works great.

                                                                    Must be a lot more sensative.

                                                                    Many thanks

                                                                    AlbumMan

                                                                    • 72. Re: Changes to Photoshop CS5 and Applescript
                                                                      ryan135 Level 1

                                                                      Hi,

                                                                       

                                                                      I have a similar issue, but cannot seem to get my script to work using the Photoshop CS5 trial version. Here is the script for Photoshop CS3, which works. Any help would be appreciated.

                                                                       

                                                                      Thanks.

                                                                       

                                                                      Ryan (sherman@enasco.com)

                                                                       

                                                                       

                                                                      with timeout of 10000 seconds

                                                                                tell application "Finder"

                                                                        --select folder to run proofs on

                                                                        activate

                                                                                          set finalPDFsFolder to choose folder with prompt "Select Final PDF's folder"

                                                                                          set folPath to finalPDFsFolder as text

                                                                        --list contents of selected folder

                                                                                          set folList to list folder finalPDFsFolder without invisibles

                                                                                          display dialog "Import version file as CMYK or Grayscale?" buttons {"CMYK", "grayscale"}

                                                                                          set theMode to button returned in the result

                                                                        --if contents don't contain "Regular Version" folder and "Version Proofs" folder and at least one other folder then error

                                                                        (*repeat with a in folList

                                                                                                    set tempFile to (folPath & a) as alias

                                                                                                    if file type of tempFile is not "fold" then

                                                                                                              error "The Folder you have selected is not set up properly, this script will end. Bonehead!"

                                                                                                    end if

                                                                                          end repeat*)

                                                                                          if (count of folList) < 3 then

                                                                                                    error "The Folder you have selected is not set up properly, this script will end. Bonehead!"

                                                                                          end if

                                                                                          set tempfolList to {}

                                                                                          repeat with y in folList

                                                                                                    set y to y as string

                                                                                                    copy y to end of tempfolList

                                                                                          end repeat

                                                                                          if tempfolList does not contain "Approved Regular Version" and tempfolList does not contain "Version Proofs" then

                                                                                                    error "The Folder you have selected is not set up properly, this script will end. Bonehead!"

                                                                                          end if

                                                                       

                                                                        --set up paths to regular and version proof folders

                                                                                          set regVerFol to (folPath & "Approved Regular Version") as alias

                                                                                          set regVerPath to regVerFol as text

                                                                                          set verProofsFol to (folPath & "Version Proofs") as alias

                                                                                          set verProofsPath to verProofsFol as text

                                                                       

                                                                        --list contents of "Approved Regular Version" folder

                                                                                          set regVerList to list folder regVerFol

                                                                                          set theList to regVerList

                                                                                          set sortedList to my quickSort(theList)

                                                                                          set regVerList to sortedList

                                                                       

                                                                        --make a list of root names of regular version files

                                                                                          set RegVerRoots to {}

                                                                                          repeat with j in regVerList

                                                                                                    set oldDelim to AppleScript's text item delimiters

                                                                                                    set AppleScript's text item delimiters to "."

                                                                                                    set jRoot to text item 1 of j

                                                                                                    set AppleScript's text item delimiters to oldDelim

                                                                                                    copy jRoot to the end of RegVerRoots

                                                                                          end repeat

                                                                       

                                                                        --list contents of "Version Proofs" folder

                                                                                          set verProofsList to list folder verProofsFol

                                                                                          set theList to verProofsList

                                                                                          set sortedList to my quickSort(theList)

                                                                                          set verProofsList to sortedList

                                                                       

                                                                       

                                                                        --make a list of the other folders

                                                                                          set verFolList to {}

                                                                                          repeat with x in folList

                                                                                                    set x to x as string

                                                                                                    if x is not "Regular Version" and x is not "Version Proofs" and x is not "Approved Regular Version" then

                                                                                                              copy x to the end of verFolList

                                                                                                    end if

                                                                                          end repeat

                                                                       

                                                                        --list contents of other folders through repeat statement(s)

                                                                        --compare contents of Approved Regular Version folder to contents of other folder

                                                                        --if there's a match set the two files as a pair and slap them in a list

                                                                                          set filePairsList to {}

                                                                                          repeat with z in verFolList

                                                                                                    set zFol to (folPath & z) as alias

                                                                                                    set zFolPath to zFol as text

                                                                                                    set zFolList to list folder zFol

                                                                                                    set theList to zFolList

                                                                                                    set sortedList to my quickSort(theList)

                                                                                                    set zFolList to sortedList

                                                                       

                                                                                                    set zFiles to {}

                                                                                                    repeat with zz in zFolList

                                                                                                              set zzz to (zFolPath & zz) as alias

                                                                                                              copy zzz to the end of zFiles

                                                                                                    end repeat

                                                                       

                                                                                                    repeat with i in zFiles

                                                                                                              set zName to name of i

                                                                                                              set oldDelim to AppleScript's text item delimiters

                                                                                                              set AppleScript's text item delimiters to "_"

                                                                                                              set zRoot to text item 1 of zName

                                                                                                              set AppleScript's text item delimiters to oldDelim

                                                                       

                                                                                                              if RegVerRoots contains zRoot then

                                                                                                                        set jFileName to zRoot & ".pdf"

                                                                                                                        set j to (regVerPath & jFileName) as alias

                                                                                                                        set i to i as alias

                                                                                                                        set pairList to {j, i}

                                                                                                                        copy pairList to the end of filePairsList

                                                                                                              end if

                                                                                                    end repeat

                                                                                          end repeat

                                                                       

                                                                        --if Version Proofs is empty merge files in filePairsList

                                                                                          if verProofsList is {} then

                                                                                                    repeat with v in filePairsList

                                                                                                              set regFile to item 1 of v

                                                                                                              set verFile to item 2 of v

                                                                                                              set doc1 to name of regFile

                                                                                                              set doc2 to name of verFile

                                                                                                              my mergeFiles(regFile, verFile, doc1, doc2, verProofsFol)

                                                                                                    end repeat

                                                                                          else

                                                                                                    set verProofsRootList to {}

                                                                                                    repeat with q in verProofsList

                                                                                                              set oldDelim to AppleScript's text item delimiters

                                                                                                              set AppleScript's text item delimiters to "_"

                                                                                                              set qRoot to text item 1 of q

                                                                                                              set AppleScript's text item delimiters to oldDelim

                                                                                                              copy qRoot to the end of verProofsRootList

                                                                                                    end repeat

                                                                                          end if

                                                                        --compare files in pair list to files in "Version Proofs"

                                                                                          set finalPairsList to {}

                                                                                          repeat with n in filePairsList

                                                                                                    set regFile to item 1 of n

                                                                                                    set regFileName to name of regFile

                                                                                                    set suffixFile to item 2 of n

                                                                                                    set suffixFileName to name of suffixFile as string

                                                                        (*set offset1 to offset of "_" in suffixFileName

                                                                                                    set offset2 to (offset of "." in suffixFileName) - 1

                                                                                                    set theString to ""

                                                                                                    set theSuffix to characters offset1 thru offset2 of suffixFileName

                                                                                                    repeat with i in theSuffix

                                                                                                              set theString to theString & i

                                                                                                    end repeat

                                                                                                    set oldDelim to AppleScript's text item delimiters

                                                                                                    set AppleScript's text item delimiters to "."

                                                                                                    set regFileRoot to text item 1 of regFileName

                                                                                                    set AppleScript's text item delimiters to oldDelim*)

                                                                                                    if verProofsList contains suffixFileName then

                                                                                                              set modDate2 to modification date of item 2 of n

                                                                                                              set verFile to suffixFile

                                                                                                              set verModDate to modification date of verFile

                                                                                                              if (modDate2 > verModDate) then

                                                                                                                        set n to n as list

                                                                                                                        copy n to the end of finalPairsList

                                                                                                              end if

                                                                                                    else

                                                                                                              set n to n as list

                                                                                                              copy n to the end of finalPairsList

                                                                                                    end if

                                                                                          end repeat

                                                                       

                                                                                          repeat with v in finalPairsList

                                                                                                    set regFile to item 1 of v

                                                                                                    set verFile to item 2 of v

                                                                                                    set doc1 to name of regFile

                                                                                                    set doc2 to name of verFile

                                                                                                    my mergeFiles(regFile, verFile, doc1, doc2, verProofsFol, theMode)

                                                                                          end repeat

                                                                        activate

                                                                                          display dialog "Script is complete. Please verify that the Version Proofs were saved correctly. Have a nice day!" giving up after 5

                                                                                end tell

                                                                      end timeout

                                                                       

                                                                      on quickSort(theList)

                                                                                set lesserList to {}

                                                                                set greaterList to {}

                                                                                try

                                                                                          set thePivot to theList's first item

                                                                                          repeat with eachItem in theList's rest

                                                                                                    if eachItem's contents is less than thePivot then

                                                                                                              set lesserList's end to eachItem's contents

                                                                                                    else

                                                                                                              set greaterList's end to eachItem's contents

                                                                                                    end if

                                                                                          end repeat

                                                                                          if lesserList is not {} then set lesserList to quickSort(lesserList)

                                                                                          if greaterList is not {} then set greaterList to quickSort(greaterList)

                                                                                          return lesserList & thePivot & greaterList

                                                                                on error

                                                                                          return ""

                                                                                end try

                                                                      end quickSort

                                                                       

                                                                      on mergeFiles(regFile, verFile, doc1, doc2, verProofsFol, theMode)

                                                                                tell application "Finder"

                                                                                          set verFileName to name of verFile & ".pdf"

                                                                                          set oldDelim to AppleScript's text item delimiters

                                                                                          set AppleScript's text item delimiters to "."

                                                                                          set verFileRoot to text item 1 of verFileName as string

                                                                                          set AppleScript's text item delimiters to oldDelim

                                                                                          set vpFileName to ((verProofsFol) & verFileRoot & "VP.pdf") as string

                                                                                end tell

                                                                                tell application "Adobe Photoshop CS3"

                                                                                          set regOptions to {class:PDF open options, name:doc1, resolution:300, mode:CMYK, crop page:media box}

                                                                                          set saveOptions to {class:PDF save options, encoding:ZIP, embed color profile:false, PDF compatibility:PDF 13, PDF standard:PDFX1a2001 standard, preserve editing:false}

                                                                        activate

                                                                        open regFile as PDF with options regOptions

                                                                        flatten document doc1

                                                                                          set theHeight to height of document doc1

                                                                                          set theWidth to width of document doc1

                                                                                          set splitList to split channels document doc1

                                                                                          set blackPlate to item 4 of splitList

                                                                        close blackPlate saving no

                                                                                          if theMode is not "grayscale" then

                                                                                                    set verOptions to {class:PDF open options, name:doc2, resolution:300, mode:CMYK, crop page:media box}

                                                                        open verFile as PDF with options verOptions

                                                                        flatten document doc2

                                                                                                    set splitList2 to split channels document doc2

                                                                                                    set cyanPlate2 to item 1 of splitList2

                                                                                                    set magPlate2 to item 2 of splitList2

                                                                                                    set yellowPlate2 to item 3 of splitList2

                                                                        close cyanPlate2 saving no

                                                                        close magPlate2 saving no

                                                                        close yellowPlate2 saving no

                                                                                          else

                                                                                                    set verOptions to {class:PDF open options, mode:grayscale, resolution:300}

                                                                        open verFile as PDF with options verOptions

                                                                        flatten document doc2

                                                                                          end if

                                                                                          set newDocProperties to {height:theHeight, width:theWidth, mode:CMYK, resolution:300, initial fill:white, color profile kind:none}

                                                                        make new document with properties newDocProperties

                                                                                          do action "Merge Files" from "Nasco Prepress"

                                                                        save document 1 in vpFileName as Photoshop PDF with options saveOptions appending lowercase extension without copying

                                                                        close document 1 saving no

                                                                        purge clipboard cache

                                                                                end tell

                                                                      end mergeFiles

                                                                      • 73. Re: Changes to Photoshop CS5 and Applescript
                                                                        Muppet Mark Level 5

                                                                        Ryan, I don't have all this folder structure and files for me to check your script… However the issue with CS5 & Photoshop is it now likes to be passed strings of file paths rather than finder's alias file specifiers… so at a quick overview I can see you copy i & j as a list pair of aliases to another list filePairsList you later pass these as arguments to your mergeFiles sub-routine… Make items i & j strings instead… and hopefully that should do you…

                                                                        • 74. Re: Changes to Photoshop CS5 and Applescript
                                                                          ryan135 Level 1

                                                                          Thanks for the info Mark. Can you specify exactly which statements in the script to change to strings? I certainly appreciate your help. If you have time to look at this, I can send you the file structure and files. You can email me at sherman@enasco.com and I will forward you the information.

                                                                           

                                                                          Thanks.

                                                                           

                                                                          Ryan

                                                                          • 75. Re: Changes to Photoshop CS5 and Applescript
                                                                            Muppet Mark Level 5

                                                                            I just quickly made the 2 suggested edits where I think your issue may be… Also changed CS3 to CS5 in the sub…

                                                                             

                                                                            with timeout of 10000 seconds

                                                                                      tell application "Finder"

                                                                              --select folder to run proofs on

                                                                              activate

                                                                                                set finalPDFsFolder to choose folder with prompt "Select Final PDF's folder"

                                                                                                set folPath to finalPDFsFolder as text

                                                                              --list contents of selected folder

                                                                                                set folList to list folder finalPDFsFolder without invisibles

                                                                                                display dialog "Import version file as CMYK or Grayscale?" buttons {"CMYK", "grayscale"}

                                                                                                set theMode to button returned in the result

                                                                              --if contents don't contain "Regular Version" folder and "Version Proofs" folder and at least one other folder then error

                                                                              (*repeat with a in folList

                                                                                                          set tempFile to (folPath & a) as alias

                                                                                                          if file type of tempFile is not "fold" then

                                                                                                                    error "The Folder you have selected is not set up properly, this script will end. Bonehead!"

                                                                                                          end if

                                                                                                end repeat*)

                                                                                                if (count of folList) < 3 then

                                                                                                          error "The Folder you have selected is not set up properly, this script will end. Bonehead!"

                                                                                                end if

                                                                                                set tempfolList to {}

                                                                                                repeat with y in folList

                                                                                                          set y to y as string

                                                                                                          copy y to end of tempfolList

                                                                                                end repeat

                                                                                                if tempfolList does not contain "Approved Regular Version" and tempfolList does not contain "Version Proofs" then

                                                                                                          error "The Folder you have selected is not set up properly, this script will end. Bonehead!"

                                                                                                end if

                                                                             

                                                                              --set up paths to regular and version proof folders

                                                                                                set regVerFol to (folPath & "Approved Regular Version") as alias

                                                                                                set regVerPath to regVerFol as text

                                                                                                set verProofsFol to (folPath & "Version Proofs") as alias

                                                                                                set verProofsPath to verProofsFol as text

                                                                             

                                                                              --list contents of "Approved Regular Version" folder

                                                                                                set regVerList to list folder regVerFol

                                                                                                set theList to regVerList

                                                                                                set sortedList to my quickSort(theList)

                                                                                                set regVerList to sortedList

                                                                             

                                                                              --make a list of root names of regular version files

                                                                                                set RegVerRoots to {}

                                                                                                repeat with j in regVerList

                                                                                                          set oldDelim to AppleScript's text item delimiters

                                                                                                          set AppleScript's text item delimiters to "."

                                                                                                          set jRoot to text item 1 of j

                                                                                                          set AppleScript's text item delimiters to oldDelim

                                                                                                          copy jRoot to the end of RegVerRoots

                                                                                                end repeat

                                                                             

                                                                              --list contents of "Version Proofs" folder

                                                                                                set verProofsList to list folder verProofsFol

                                                                                                set theList to verProofsList

                                                                                                set sortedList to my quickSort(theList)

                                                                                                set verProofsList to sortedList

                                                                             

                                                                             

                                                                              --make a list of the other folders

                                                                                                set verFolList to {}

                                                                                                repeat with x in folList

                                                                                                          set x to x as string

                                                                                                          if x is not "Regular Version" and x is not "Version Proofs" and x is not "Approved Regular Version" then

                                                                                                                    copy x to the end of verFolList

                                                                                                          end if

                                                                                                end repeat

                                                                             

                                                                              --list contents of other folders through repeat statement(s)

                                                                              --compare contents of Approved Regular Version folder to contents of other folder

                                                                              --if there's a match set the two files as a pair and slap them in a list

                                                                                                set filePairsList to {}

                                                                                                repeat with z in verFolList

                                                                                                          set zFol to (folPath & z) as alias

                                                                                                          set zFolPath to zFol as text

                                                                                                          set zFolList to list folder zFol

                                                                                                          set theList to zFolList

                                                                                                          set sortedList to my quickSort(theList)

                                                                                                          set zFolList to sortedList

                                                                             

                                                                                                          set zFiles to {}

                                                                                                          repeat with zz in zFolList

                                                                                                                    set zzz to (zFolPath & zz) as alias

                                                                                                                    copy zzz to the end of zFiles

                                                                                                          end repeat

                                                                             

                                                                                                          repeat with i in zFiles

                                                                                                                    set zName to name of i

                                                                                                                    set oldDelim to AppleScript's text item delimiters

                                                                                                                    set AppleScript's text item delimiters to "_"

                                                                                                                    set zRoot to text item 1 of zName

                                                                                                                    set AppleScript's text item delimiters to oldDelim

                                                                             

                                                                                                                    if RegVerRoots contains zRoot then

                                                                                                                              set jFileName to zRoot & ".pdf"

                                                                                                                              set j to (regVerPath & jFileName) as text

                                                                                                                              set i to i as text

                                                                                                                              set pairList to {j, i}

                                                                                                                              copy pairList to the end of filePairsList

                                                                                                                    end if

                                                                                                          end repeat

                                                                                                end repeat

                                                                             

                                                                              --if Version Proofs is empty merge files in filePairsList

                                                                                                if verProofsList is {} then

                                                                                                          repeat with v in filePairsList

                                                                                                                    set regFile to item 1 of v

                                                                                                                    set verFile to item 2 of v

                                                                                                                    set doc1 to name of regFile

                                                                                                                    set doc2 to name of verFile

                                                                                                                    my mergeFiles(regFile, verFile, doc1, doc2, verProofsFol)

                                                                                                          end repeat

                                                                                                else

                                                                                                          set verProofsRootList to {}

                                                                                                          repeat with q in verProofsList

                                                                                                                    set oldDelim to AppleScript's text item delimiters

                                                                                                                    set AppleScript's text item delimiters to "_"

                                                                                                                    set qRoot to text item 1 of q

                                                                                                                    set AppleScript's text item delimiters to oldDelim

                                                                                                                    copy qRoot to the end of verProofsRootList

                                                                                                          end repeat

                                                                                                end if

                                                                              --compare files in pair list to files in "Version Proofs"

                                                                                                set finalPairsList to {}

                                                                                                repeat with n in filePairsList

                                                                                                          set regFile to item 1 of n

                                                                                                          set regFileName to name of regFile

                                                                                                          set suffixFile to item 2 of n

                                                                                                          set suffixFileName to name of suffixFile as string

                                                                              (*set offset1 to offset of "_" in suffixFileName

                                                                                                          set offset2 to (offset of "." in suffixFileName) - 1

                                                                                                          set theString to ""

                                                                                                          set theSuffix to characters offset1 thru offset2 of suffixFileName

                                                                                                          repeat with i in theSuffix

                                                                                                                    set theString to theString & i

                                                                                                          end repeat

                                                                                                          set oldDelim to AppleScript's text item delimiters

                                                                                                          set AppleScript's text item delimiters to "."

                                                                                                          set regFileRoot to text item 1 of regFileName

                                                                                                          set AppleScript's text item delimiters to oldDelim*)

                                                                                                          if verProofsList contains suffixFileName then

                                                                                                                    set modDate2 to modification date of item 2 of n

                                                                                                                    set verFile to suffixFile

                                                                                                                    set verModDate to modification date of verFile

                                                                                                                    if (modDate2 > verModDate) then

                                                                                                                              set n to n as list

                                                                                                                              copy n to the end of finalPairsList

                                                                                                                    end if

                                                                                                          else

                                                                                                                    set n to n as list

                                                                                                                    copy n to the end of finalPairsList

                                                                                                          end if

                                                                                                end repeat

                                                                             

                                                                                                repeat with v in finalPairsList

                                                                                                          set regFile to item 1 of v

                                                                                                          set verFile to item 2 of v

                                                                                                          set doc1 to name of regFile

                                                                                                          set doc2 to name of verFile

                                                                                                          my mergeFiles(regFile, verFile, doc1, doc2, verProofsFol, theMode)

                                                                                                end repeat

                                                                              activate

                                                                                                display dialog "Script is complete. Please verify that the Version Proofs were saved correctly. Have a nice day!" giving up after 5

                                                                                      end tell

                                                                            end timeout

                                                                             

                                                                            on quickSort(theList)

                                                                                      set lesserList to {}

                                                                                      set greaterList to {}

                                                                                      try

                                                                                                set thePivot to theList's first item

                                                                                                repeat with eachItem in theList's rest

                                                                                                          if eachItem's contents is less than thePivot then

                                                                                                                    set lesserList's end to eachItem's contents

                                                                                                          else

                                                                                                                    set greaterList's end to eachItem's contents

                                                                                                          end if

                                                                                                end repeat

                                                                                                if lesserList is not {} then set lesserList to quickSort(lesserList)

                                                                                                if greaterList is not {} then set greaterList to quickSort(greaterList)

                                                                                                return lesserList & thePivot & greaterList

                                                                                      on error

                                                                                                return ""

                                                                                      end try

                                                                            end quickSort

                                                                             

                                                                            on mergeFiles(regFile, verFile, doc1, doc2, verProofsFol, theMode)

                                                                                      tell application "Finder"

                                                                                                set verFileName to name of verFile & ".pdf"

                                                                                                set oldDelim to AppleScript's text item delimiters

                                                                                                set AppleScript's text item delimiters to "."

                                                                                                set verFileRoot to text item 1 of verFileName as string

                                                                                                set AppleScript's text item delimiters to oldDelim

                                                                                                set vpFileName to ((verProofsFol) & verFileRoot & "VP.pdf") as string

                                                                                      end tell

                                                                                      tell application "Adobe Photoshop CS5"

                                                                                                set regOptions to {class:PDF open options, name:doc1, resolution:300, mode:CMYK, crop page:media box}

                                                                                                set saveOptions to {class:PDF save options, encoding:ZIP, embed color profile:false, PDF compatibility:PDF 13, PDF standard:PDFX1a2001 standard, preserve editing:false}

                                                                              activate

                                                                              open regFile as PDF with options regOptions

                                                                              flatten document doc1

                                                                                                set theHeight to height of document doc1

                                                                                                set theWidth to width of document doc1

                                                                                                set splitList to split channels document doc1

                                                                                                set blackPlate to item 4 of splitList

                                                                              close blackPlate saving no

                                                                                                if theMode is not "grayscale" then

                                                                                                          set verOptions to {class:PDF open options, name:doc2, resolution:300, mode:CMYK, crop page:media box}

                                                                              open verFile as PDF with options verOptions

                                                                              flatten document doc2

                                                                                                          set splitList2 to split channels document doc2

                                                                                                          set cyanPlate2 to item 1 of splitList2

                                                                                                          set magPlate2 to item 2 of splitList2

                                                                                                          set yellowPlate2 to item 3 of splitList2

                                                                              close cyanPlate2 saving no

                                                                              close magPlate2 saving no

                                                                              close yellowPlate2 saving no

                                                                                                else

                                                                                                          set verOptions to {class:PDF open options, mode:grayscale, resolution:300}

                                                                              open verFile as PDF with options verOptions

                                                                              flatten document doc2

                                                                                                end if

                                                                                                set newDocProperties to {height:theHeight, width:theWidth, mode:CMYK, resolution:300, initial fill:white, color profile kind:none}

                                                                              make new document with properties newDocProperties

                                                                                                do action "Merge Files" from "Nasco Prepress"

                                                                              save document 1 in vpFileName as Photoshop PDF with options saveOptions appending lowercase extension without copying

                                                                              close document 1 saving no

                                                                              purge clipboard cache

                                                                                      end tell

                                                                            end mergeFiles

                                                                            • 76. Re: Changes to Photoshop CS5 and Applescript
                                                                              ryan135 Level 1

                                                                              Hi Mark,

                                                                               

                                                                              Thanks for the edits. Applescript now receives an error:

                                                                               

                                                                              Can't get name of "Macintosh HD:Users:ryansherman:Desktop:Final PDF Files:Approved Regular Version:12PEp007.pdf".

                                                                               

                                                                              set regFileName to name of regFile  = this is the culprit in the script.

                                                                               

                                                                              Any suggestion to fix this?

                                                                               

                                                                              Thanks.

                                                                               

                                                                              Ryan

                                                                              • 77. Re: Changes to Photoshop CS5 and Applescript
                                                                                ryan135 Level 1

                                                                                Hi Mark,

                                                                                 

                                                                                I did some testing on this, and found out I needed to "set regFile to regFile as string" through the Finder and then "open file regFile as PDF with options regOptions" in Photoshop CS5. Thanks again for all your help!! I appreciate it.

                                                                                 

                                                                                Ryan

                                                                                 

                                                                                tell application "Adobe Photoshop CS5"

                                                                                                    set regOptions to {class:PDF open options, name:doc1, resolution:300, mode:CMYK, crop page:media box}

                                                                                                    set saveOptions to {class:PDF save options, encoding:ZIP, embed color profile:false, PDF compatibility:PDF 13, PDF standard:PDFX1a2001 standard, preserve editing:false}

                                                                                  activate

                                                                                                    tell application "Finder"

                                                                                                              set regFile to regFile as string

                                                                                                    end tell

                                                                                  open file regFile as PDF with options regOptions

                                                                                  flatten document doc1

                                                                                                    set theHeight to height of document doc1

                                                                                                    set theWidth to width of document doc1

                                                                                                    set splitList to split channels document doc1

                                                                                                    set blackPlate to item 4 of splitList

                                                                                  close blackPlate saving no

                                                                                                    if theMode is not "grayscale" then

                                                                                                              set verOptions to {class:PDF open options, name:doc2, resolution:300, mode:CMYK, crop page:media box}

                                                                                                              tell application "Finder"

                                                                                                                        set verFile to verFile as string

                                                                                                              end tell

                                                                                  open file verFile as PDF with options verOptions

                                                                                  flatten document doc2

                                                                                • 78. Re: Changes to Photoshop CS5 and Applescript
                                                                                  pe-te

                                                                                  Please send me the fix too!

                                                                                   

                                                                                  pe (minus) te (at) web (dot) de

                                                                                  • 79. Re: Changes to Photoshop CS5 and Applescript
                                                                                    GuyJr Level 1

                                                                                    This is the biggest problem Adobe has. They laid off a couple of the wrong people. They should have kept a couple of the OS gurus.

                                                                                     

                                                                                    I've had to manually to into the registry to link photoshop, indesign, and illustrator files. Who knows what the links are with droplets. They should just work!

                                                                                     

                                                                                    But uninstalling all the apps, running a goofy little utility that never should have been created in the first place, then reinstalling all the apps is NOT the signature of a class operation.

                                                                                    1 2 Previous Next