Photoshop Files - Resolution set to Pixels/Centimeter

I have an issue where certain Photoshop files I receive have the resolution set to Pixels/Centimeter. Does anybody know of an AppleScript that will change the resolution to Pixels/Inch?

Thanks in advance,
-Jeff

Try to record a Photoshop action to perform this task - will it work?

Then you can call the action from AppleScript.

Yes, an action would work, but it is not ideal when dealing with mutliple computers. I was hoping somebody knew of a simple scripting solution. Nevertheless, I do very much appreciate the response and suggestion.

As far as I can tell, there’s no way to do this via AppleScript directly using Photoshop commands.

To run an independent AppleScript I see two potential solutions:

• GUI scripting. I don’t know if it works with Photoshop UI (and in general don’t have much experience with GUI scripting). You can try or others may provide more info.

• Use a Photoshop script listener plug-in, then use JavaScript it outputs in AppleScript.

In the past it was ScriptListener (on Silicon, you’ll need to run Photoshop in Rosetta for this plug-in to work):

Now there’s also Alchemist (which I never used):

Alchemist looks like a much more advanced tool - but I’m not sure that its output can be used as JS in AppleScript or is it for UXP only

You’ll need to run the desired operations in Photoshop, take the relevant output from your script listener plug-in, then use it in AppleScript via do javascript command.

I successfully used ScriptListener in the past to automate Photoshop operations not directly available via AppleScript.

Wow! Thank you so very much for you sharing this information Leo! I ended up creating a workaround script that solves the issue, but not in an elegant way since it involves copying the file to a new file based on the clipboard. The files my script works with are limited - I don’t really think my script is worth posting :frowning:

ha interesting idea too!