🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.photoshop.scripting
Article #485

Re: Create strip from image sequence

#485
From: Paul_R
Date: Thu, 05 Feb 2009 18:02
65 lines
1784 bytes
Applescript is a total mystery to me as I only use JavaScript even on the couple of Macs that I have.

Just been playing, and this code should create a full list of PNG files from the selected folder plus sub folders...







var imageFolder = Folder.selectDialog("Select the folder to process");  

pngList=[]; 

if (imageFolder != null)  processFolder(imageFolder); 

pngList = ReturnUniqueSortedList(pngList) 

alert("Number of PNG files found = " + pngList.length); 

 

function processFolder(folder) { 

    var fileList = folder.getFiles() 

     for (var i = 0; i < fileList.length; i++) { 

        var file = fileList[i]; 

  if (file instanceof File && file.name.match(/\.png$/i)) { 

              pngList.push(file);            

  } else  

if (file instanceof Folder) { 

       processFolder(file); 

     } 

   } 

} 

function ReturnUniqueSortedList(ArrayName){ 

var unduped = new Object; 

for (var i = 0; i < ArrayName.length; i++) {    

unduped[ArrayName[i]] = ArrayName[i]; 

} 

var uniques = new Array;for (var k in unduped) { 

   uniques.push(unduped[k]);} 

uniques.sort(); 

return uniques; 

}
Technical Details
Message-ID: <59b6a40f.22@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing
References: <59b6a40f.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f5839,62960464640e583b
X-Google-Attributes: gidf5839,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Paul_R@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.photoshop.scripting
Subject: Re: Create strip from image sequence
Message-ID: <59b6a40f.22@webcrossing.la2eafNXanI>
Date: Thu, 5 Feb 2009 10:02:02 -0800
References: <59b6a40f.-1@webcrossing.la2eafNXanI>
Lines: 38
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit