// the file used as registration mark var markFile = new File('~/desktop/reg_mark.eps'); var doc = app.activeDocument; // the color used for the text var black = new SolidColor(); black.rgb.hexValue = '000000'; var currentLayer = doc.activeLayer; var textLayer = doc.artLayers.add(); textLayer.kind = LayerKind.TEXT; // font requires the postscript name of the font textLayer.font = "Arial"; textLayer.textItem.size = new UnitValue(9,'pt'); textLayer.textItem.justification = Justification.RIGHT; // set the position for the text. this sets to top right corner of the channel // here it is set so the text baseline ends 40pts from the right edge, 15pts down textLayer.textItem.position = [new UnitValue(doc.width.as('pt')-50,'pt'),new UnitValue(15,'pt')]; textLayer.textItem.contents = 'label';// temp label string makeMarksLayer(); var marksLayer = doc.activeLayer; for(var channelIndex = 0; channelIndex