// Author: Mattias @ Randomuse.org // License: http://creativecommons.org/licenses/by/2.5/ //create and assign variables for default preferences startRulerUnits = app.preferences.rulerUnits startTypeUnits = app.preferences.typeUnits startDisplayDialogs = app.displayDialogs //change settings app.preferences.rulerUnits = Units.PIXELS app.preferences.typeUnits = TypeUnits.PIXELS if (app.documents.length != 0) { // Use first document as base for the target document. newdocWidthpx = documents[0].width newdocHeight = documents[0].height newdocRes = documents[0].resolution // How many documents open? docsToMerge = documents.length // Add the target document app.documents.add(newdocWidthpx, newdocHeight, newdocRes) // Get a ref to the target document trgtDocRef = app.activeDocument // Keep track of how many documents added addedDocs = 0 // Loop the documents to merge as items for (i=0;i