Local and cloud-based workflows for extracting and updating text layers in PSD files via ExtendScript and Adobe PS API. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
No EOL
696 B
JavaScript
28 lines
No EOL
696 B
JavaScript
// Simple Extract Script for Testing
|
|
#target photoshop
|
|
|
|
// Simple output function
|
|
function writeFile(path, content) {
|
|
var file = new File(path);
|
|
file.encoding = "UTF8";
|
|
file.open("w");
|
|
file.write(content);
|
|
file.close();
|
|
return file.exists;
|
|
}
|
|
|
|
// Main function
|
|
function main() {
|
|
$.writeln("Script started");
|
|
|
|
// Try to write to Desktop
|
|
var outputPath = "~/Desktop/ps_output_test.txt";
|
|
var success = writeFile(outputPath, "Test content - " + new Date().toString());
|
|
|
|
$.writeln("Write attempt to " + outputPath + ": " + (success ? "SUCCESS" : "FAILED"));
|
|
|
|
// No alert to avoid user interaction
|
|
$.writeln("Script completed");
|
|
}
|
|
|
|
main(); |