6up and 8up Script

Upload Photoshop Scripts, download Photoshop Scripts, Discussion and Support of Photoshop Scripts

Moderators: Tom, Kukurykus

tdids
Posts: 1
Joined: Wed May 03, 2017 1:52 am

6up and 8up Script

Post by tdids »

Hi guys,

I was looking for a script that would help me create 8ups (passport style) as a new file. I tried searching for this but searching 8ups didn't return anything so if anyone could point me in the right direction or is able to write a script to do this, it would be much appreciated. Let me know if you have any experience with this.
pixxxelschubser
Posts: 26
Joined: Mon Aug 01, 2016 8:59 pm

Re: 6up and 8up Script

Post by pixxxelschubser »

Sorry, but there are to little informations.
  1. with dialog or fixed value for 6 or 8-up?
  2. with gaps or not?
  3. with background or transparent?
  4. with error management or not?
  5. you want to write the script by yourself or not?
But anyway – for the beginning (one image should be opened in PS):

Code: Select all

app.preferences.rulerUnits = Units.PIXELS;
/////////////////////////////////////////////////////////////////////////////////////////////////
var numberX = 2;
var numberY = 4;
/////////////////////////////////////////////////////////////////////////////////////////////////

var aDoc = activeDocument;
var wdt = aDoc.width;
var hgt = aDoc.height;
var wDoc = wdt*numberX;
var hDoc = hgt*numberY;

canvasSize(wDoc, hgt);

for(var i=1; i<numberX; i++){
dupLayer ();
aDoc.activeLayer.translate(wdt,0);
}
aDoc.flatten();
canvasSize(wDoc, hDoc);

for(var j=1; j<numberY; j++){
dupLayer ();
aDoc.activeLayer.translate(0,hgt);
}
aDoc.flatten();

function dupLayer() {
executeAction(charIDToTypeID('CpTL'), undefined, DialogModes.NO);
}

function canvasSize(wdt, hgt) {
aDoc.activeLayer.isBackgroundLayer = false;
var desc1 = new ActionDescriptor();
desc1.putUnitDouble( charIDToTypeID('Wdth'), charIDToTypeID('#Pxl'), wdt );
desc1.putUnitDouble( charIDToTypeID('Hght'), charIDToTypeID('#Pxl'), hgt );
desc1.putEnumerated( charIDToTypeID('Hrzn'), charIDToTypeID('HrzL'), charIDToTypeID('Left') );
desc1.putEnumerated( charIDToTypeID('Vrtc'), charIDToTypeID('VrtL'), charIDToTypeID('Top ') );
executeAction( charIDToTypeID('CnvS'), desc1, DialogModes.NO );
}
Have fun
;)
pixxxelschubser
Posts: 26
Joined: Mon Aug 01, 2016 8:59 pm

Re: 6up and 8up Script

Post by pixxxelschubser »

tdids wrote:Hi guys,
… I tried searching for this but searching 8ups didn't return anything so if anyone could point me in the right direction or is able to write a script to do this, it would be much appreciated …
Hmmh? I can't see that "it would be much appreciated"
:roll:
tdids wrote:Hi guys,
… didn't return anything …
You also "didn't return anything"
:shock:

Remember:
No feedback is the worst feedback ever!
:cry: