reload color settings after a photoshop cleaning

Community Beginner ,
Aug 17, 2022 Aug 17, 2022

Copy link to clipboard

Copied

Hello everyone how are you ?

I am working, at a studio photo, there is a post for clients with photoshop, between shootings i run a bash script who delete all the data of photoshop 

rm -r /Users/$USER/Library/Preferences/Adobe\ Photoshop*
rm -rf /Users/$USER/Library/Preferences/Adobe\ Photoshop*
rm -rf /Users/$USER/Library/Preferences/com.adobe.Photoshop*

 

I got a struggle I need to setup with script bash or something else, a solution when I should clean all Photoshop setting without touching the color settings, but I can't find the life which is link with thoses settings. Could someone can help me please ? 

I think about another way to do this, maybe a script after I ran my cleanup, which load the good CSF file with my settings. It need to be automatically because the client clean the laptop at the end of the shoot and they always forgot the color settings.

 

Sorry for my english 

Best regards,

 

 

TOPICS
Actions and scripting

Views

78

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

correct answers 1 Correct answer

Community Expert , Aug 17, 2022 Aug 17, 2022

@SheriffTech – I think that @kevin stohlmeyer has a good suggestion.

 

If you wish to stick with your bash script approach, then a Photoshop JavaScript to load your custom-named color settings file "SHERIFF":

 

loadColorSettings("SHERIFF");

function loadColorSettings(csfName) {
	function s2t(s) {
        return app.stringIDToTypeID(s);
    }
	var descriptor = new ActionDescriptor();
	var descriptor2 = new ActionDescriptor();
	var reference = new ActionReference();
	reference.putProperty( s2t( "
...

Likes

Translate

Translate
Community Expert ,
Aug 17, 2022 Aug 17, 2022

Copy link to clipboard

Copied

A simpler option is to use the Photoshop Preferences/General and click the Reset Preferences upon Quit.

That resets your PS preferences and maintains the color settings.

Kevin Stohlmeyer
Adobe Community Expert/Adobe Certified Instructor

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 ,
Aug 17, 2022 Aug 17, 2022

Copy link to clipboard

Copied

I need it to be automated because i'm not physically here to clic the button for customers. Do you know how can I make a script or something else ?

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 Expert ,
Aug 17, 2022 Aug 17, 2022

Copy link to clipboard

Copied

@SheriffTech – I think that @kevin stohlmeyer has a good suggestion.

 

If you wish to stick with your bash script approach, then a Photoshop JavaScript to load your custom-named color settings file "SHERIFF":

 

loadColorSettings("SHERIFF");

function loadColorSettings(csfName) {
	function s2t(s) {
        return app.stringIDToTypeID(s);
    }
	var descriptor = new ActionDescriptor();
	var descriptor2 = new ActionDescriptor();
	var reference = new ActionReference();
	reference.putProperty( s2t( "property" ), s2t( "colorSettings" ));
	reference.putEnumerated( s2t( "application" ), s2t( "ordinal" ), s2t( "targetEnum" ));
	descriptor.putReference( s2t( "null" ), reference );
	descriptor2.putString( s2t( "name" ), csfName );
	descriptor.putObject( s2t( "to" ), s2t( "colorSettings" ), descriptor2 );
	executeAction( s2t( "set" ), descriptor, DialogModes.NO );
}

 

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 ,
Aug 17, 2022 Aug 17, 2022

Copy link to clipboard

Copied

thank you i will check how can I run this linked with bash script !

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 Expert ,
Aug 17, 2022 Aug 17, 2022

Copy link to clipboard

Copied

You're welcome. I'm not sure if this helps or not for automation:

 

https://prepression.blogspot.com/2021/10/photoshop-script-events-manager.html

 

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 ,
Aug 19, 2022 Aug 19, 2022

Copy link to clipboard

Copied

LATEST

Thanks for your help, I use the Javascript and put in into the photoshop scripts and everytime you launch the app the script load the good color setting, it works perfectly !

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