SCRIPTING: event before saving document

Community Beginner ,
Feb 05, 2022 Feb 05, 2022

Copy link to clipboard

Copied

Is there any way to run a JSX script before the file is saved?
Each time the user clicks the Save command, I would like to save in the XMP data whether the PSD file is saved with compression or not.
By using the Start Save Document event in the Script Events Manager, my script runs right after the save starts, not before. Do you have any idea how to get around it?

TOPICS
Actions and scripting , Windows

Views

97

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 05, 2022 Feb 05, 2022

Copy link to clipboard

Copied

It is possible to write metadata after the file has been saved: Creating new metadata example in Javascript Tool Guide

 

P.S. psd compression is a global setting, that is, whether it is enabled or not can be understood and written to metadata at any time long before saving. If the situation allows, then instead of tracking the save operation, you can track the moment the option was switched in the settings.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 06, 2022 Feb 06, 2022

Copy link to clipboard

Copied

May I ask what the point of the task is? 

What is the information intended to be used for? 

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 08, 2022 Feb 08, 2022

Copy link to clipboard

Copied

LATEST

@jazz-y  when transferring files between computers I want to recognize whether the file is compressed or not, so tracking a change in compression option globally here won't help.

 

@c.pfaffenbichler Recognizing whether a file is compressed or not is important to me.
I am using a script that saves the file without compression, but I want to save the final versions of the files with compression.
I need to check if the file is currently compressed.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines