/** * @title Candidate Name & D.O.P Date Strip (SSC / Sarkari) * @author Picy.in Creative Technologies (https://picy.in) * @suite Picy 25 Professional Photoshop Actions Suite * @license Free Commercial & Studio License for Photographers * @compatibility Adobe Photoshop CS6, CC 2019 - CC 2025 * @support https://picy.in/tools/photoshop-actions */ #target photoshop if (app.documents.length > 0) { var doc = app.activeDocument; var w = doc.width; var h = doc.height; var bannerHeight = h * 0.18; var bannerTop = h - bannerHeight; var selRegion = [[0, bannerTop], [w, bannerTop], [w, h], [0, h]]; doc.selection.select(selRegion); var bannerLayer = doc.artLayers.add(); bannerLayer.name = "Picy D.O.P White Banner"; var whiteColor = new SolidColor(); whiteColor.rgb.red = 255; whiteColor.rgb.green = 255; whiteColor.rgb.blue = 255; doc.selection.fill(whiteColor); doc.selection.deselect(); var textLayer = doc.artLayers.add(); textLayer.kind = LayerKind.TEXT; textLayer.name = "Candidate Name & Date"; var textItem = textLayer.textItem; textItem.contents = "NAME OF CANDIDATE\nD.O.P: " + (new Date()).toLocaleDateString(); textItem.justification = Justification.CENTER; textItem.size = new UnitValue(h * 0.045, "px"); textItem.position = [w / 2, bannerTop + (bannerHeight * 0.4)]; alert("Name & D.O.P Banner Added! Double-click text layer to type candidate name.\n\nCreated by Picy.in — https://picy.in", "Picy e-Sevai Action"); } else { alert("Open candidate photo first.", "Picy e-Sevai Action"); }