Quantcast
Channel: Adobe Community : Unanswered Discussions - Photoshop
Viewing all articles
Browse latest Browse all 74445

applescript, CS5 to CS6, files won't close

$
0
0

This is the part of my script, that runs from with photoshop. on CS5 it opened and closed everything without a problem, however in CS6 it processes the images but does not close them.

 

Can anyone see where it might be going wrong?

Let me know if you need the whole thing and I'll condense it down.

 

Many Thanks

Matt

 

tellcurrent document

 

 

  --If the quick mask mode has been left on then delete the channel Quick Mask

                                                                                if (quick mask mode) thendeletechannel¬

                                                                                          "Quick Mask"

  --If the Layer is incorrectly labeled with Original Layer it needs renaming to original Image

                                                                                if (existslayer "Original Layer") then¬

                                                                                          telllayer "Original Layer" tosetnameto "Original Image"

  savein (localBrandFolder_PSD& origName) asPhotoshop formatwith optionsmyPSDOptionswithoutcopying

                                                                                (deletelayer "Original Image") flatten

 

  resize imageresolution 300 resample methodnone

 

  --sharpen image

  filtercurrent layerusingunsharp maskwith options {amount:80, radius:3.2, threshold:0}

 

  savein (ftpBrandFolder_High_Res& name) asJPEGwith optionsmyOptionswithoutcopying

 

  --Prepare for Low RES by resetting image history

                                                                                setcurrent history statetohistory state 3

 

                                                                                flatten

 

                                                                                resize imagewidth 1348

  resize imageresolution 300 resample methodnone

  filtercurrent layerusingunsharp maskwith options {amount:80, radius:3.2, threshold:0}

 

  --add save to lowResFolder with same options

  savein (networkBrandFolder_Low_Res& name) asJPEGwith optionsmyOptionswithoutcopying

 

                                                                                setnewFiletofile path

                                                                                setnewFile2tonewFileasstring-- for testing end of name

                                                                                ifnewFile2ends with "_2.jpg" ornewFile2ends with "_3.jpg" ornewFile2ends with "_4.jpg" ornewFile2ends with "_5.jpg" ornewFile2ends with "_6.jpg" ornewFile2ends with "_7.jpg" ornewFile2ends with "_8.jpg" ornewFile2ends with "_9.jpg" ornewFile2ends with "_10.jpg" ornewFile2ends with "11.jpg" then-- exclude website_images

                                                                                          myduplicateFile(newFile, {ftpBrandFolder_Low_Res})

                                                                                else

                                                                                          myduplicateFile(newFile, {ftpBrandFolder_Low_Res, website_images})

                                                                                endif

 

  closesavingno

 

  display dialog "A"

                                                                                return

                                                                      endtell

                                                            onerror

                                                                      setnoErrortofalse

                                                                      mymyLogs(thefile) -- write path to log file in Desktop

                                                                      try

  closesavingno--if exists, close current document

  display dialog "B"

                                                                                return

                                                                      endtry



Viewing all articles
Browse latest Browse all 74445

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>