This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var selectFile = File.openDialog("Please select the file/s:", Multiselect = true); | |
for (var i = 0; i < selectFile.length; i++) { | |
var openFiles = app.open(File(selectFile[i])); | |
} | |
// or | |
var aFile = selectFile(true); | |
for (var i = 0; i < aFile.length; i++) { | |
open(File(aFile[i])); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exiftool -r -all -csv '/Users/loggedinusername/Desktop/test' > '/Users/loggedinusername/Desktop/metadata-out.csv' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
selectGroupedBaseLayer(); | |
function selectGroupedBaseLayer() { | |
// Stephen Marsh, v2.0 - 20th September 2022 | |
// Works with a visible or invisible clipping mask base layer | |
for (i = 0; i < activeDocument.layers.length; i++) { | |
if (activeDocument.activeLayer.grouped === true) { | |
//alert("Grouped, move on..."); | |
toggleLayerVisibility(true); | |
selectForwardORBackwardLayer(false, "backwardEnum"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Foreground | |
app.showColorPicker(true); | |
// or | |
// Background | |
app.showColorPicker(false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Add an incremental counter to report on the count of files saved */ | |
// Set the file save counter (outside the for loop...) | |
var counter = 0; | |
// fileList not included in this example | |
for (var i = 0; i < fileList.length; i++) { | |
var doc = open(fileList[i]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Remove %20 character from folder name via RegEx */ | |
var inputFolder = Folder.selectDialog("Select the input folder:"); | |
alert("Original Folder Path:" + "\r" + inputFolder); | |
// Full path fsName + RegEx | |
var inputFSname = inputFolder.fsName.replace(/(?:.+\/)(.+)$/, '$1');; | |
alert("FS Name:" + "\r" + inputFSname.toSource()); | |
// Remove %20 space code via regex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ellipticalSelectAll(0, 0, app.activeDocument.height.value, app.activeDocument.width.value, true); | |
function ellipticalSelectAll(top, left, bottom, right, antiAlias) { | |
var s2t = function (s) { | |
return app.stringIDToTypeID(s); | |
}; | |
var descriptor = new ActionDescriptor(); | |
var descriptor2 = new ActionDescriptor(); | |
var reference = new ActionReference(); | |
reference.putProperty( s2t( "channel" ), s2t( "selection" )); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addMask("reveallAll"); | |
function addMask(maskVisibility) { | |
// maskVisibility = "revealAll" or "hideAll" | |
var c2t = function (s) { | |
return app.charIDToTypeID(s); | |
}; | |
var s2t = function (s) { | |
return app.stringIDToTypeID(s); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maskSelection("revealSelection"); | |
function maskSelection(maskParameter) { | |
// Parameter = "revealSelection" or "hideSelection" | |
var s2t = function (s) { | |
return app.stringIDToTypeID(s); | |
}; | |
var descriptor = new ActionDescriptor(); | |
var reference = new ActionReference(); | |
descriptor.putClass( s2t( "new" ), s2t( "channel" )); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
activeDocument.quickMaskMode = true; | |
activeDocument.quickMaskMode = false; | |
//or | |
quickMask("set"); // or "clearEvent" | |
function quickMask(qmOpt) { | |
var s2t = function (s) { | |
return app.stringIDToTypeID(s); |
NewerOlder