🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.photoshop.scripting
Article #473

Re: Create strip from image sequence

#473
From: Paul_R
Date: Wed, 04 Feb 2009 23:37
86 lines
2703 bytes
Hi Andrew, png would pose a problem but might work with..
 <http://www.ps-scripts.com/bb/viewtopic.php?t=1824>
It was a while back that I wrote it for someone and could do with a makeover. What this does is paste the documents into a selected area.
As for the above script for top - down.....




 
 selectedFolder = Folder.selectDialog( "Please select input folder");   

 var fileList = selectedFolder.getFiles();   

 var strtRulerUnits = app.preferences.rulerUnits;    

var strtTypeUnits = app.preferences.typeUnits;    

app.preferences.rulerUnits = Units.PIXELS;    

app.preferences.typeUnits = TypeUnits.PIXELS;   

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

var file = fileList[a];   

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

 open(file);   

var Width = activeDocument.width.value;   

var Height = activeDocument.height.value;   

 if(documents.length > 1){   

activeDocument.selection.selectAll();   

activeDocument.selection.copy();   

activeDocument.close(SaveOptions.DONOTSAVECHANGES);    

activeDocument = documents[0];   

app.activeDocument.resizeCanvas(app.activeDocument.width,app.activeDocument.height+Height, AnchorPosition.TOPCENTER);   

activeDocument.paste();   

activeDocument.selection.selectAll();   

align('AdBt');  

app.activeDocument.selection.deselect();   

activeDocument.flatten();  

    }   

 }else{   

  continue;   

  }   

app.preferences.rulerUnits = strtRulerUnits;    

app.preferences.typeUnits = strtTypeUnits;   

}   

   

function align(method) {    

   var desc = new ActionDescriptor();   

           var ref = new ActionReference();   

           ref.putEnumerated( charIDToTypeID( "Lyr " ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );    

       desc.putReference( charIDToTypeID( "null" ), ref );    

       desc.putEnumerated( charIDToTypeID( "Usng" ), charIDToTypeID( "ADSt" ), charIDToTypeID( method ) );   

   executeAction( charIDToTypeID( "Algn" ), desc, DialogModes.NO );    

};
Technical Details
Message-ID: <59b6a40f.14@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newsfeed.news2me.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!g2news2.google.com!news2.google.com!news.glorb.com!newsfeed.news2me.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.photoshop.scripting
Subject: Re: Create strip from image sequence
Message-ID: <59b6a40f.14@webcrossing.la2eafNXanI>
Date: Wed, 4 Feb 2009 15:37:25 -0800
References: <59b6a40f.-1@webcrossing.la2eafNXanI>
Lines: 51
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit