Skip to main content
Legend
April 28, 2023
Answered

Photoshop script get user Preferences...

  • April 28, 2023
  • 1 reply
  • 844 views

Hello,

 

In our scripts dialog window we display our company branded logo, I can change the logo used based on the users preference settings in Indesign and Illustrator but is it possible to get the user Preferences>Interface>Color Theme with javascript or AM code in Photoshop?

 

Regards,

Mike

This topic has been closed for replies.
Correct answer jazz-y
var s2t = stringIDToTypeID;

(r = new ActionReference()).putProperty(s2t('property'), p = s2t('interfacePrefs'));
r.putEnumerated(s2t('application'), s2t('ordinal'), s2t('targetEnum'));
currentColorTheme = typeIDToStringID(executeActionGet(r).getObjectValue(p).getEnumerationValue(s2t('kuiBrightnessLevel')));

alert(currentColorTheme);

1 reply

jazz-yCorrect answer
Legend
April 28, 2023
var s2t = stringIDToTypeID;

(r = new ActionReference()).putProperty(s2t('property'), p = s2t('interfacePrefs'));
r.putEnumerated(s2t('application'), s2t('ordinal'), s2t('targetEnum'));
currentColorTheme = typeIDToStringID(executeActionGet(r).getObjectValue(p).getEnumerationValue(s2t('kuiBrightnessLevel')));

alert(currentColorTheme);
Mike BroAuthor
Legend
April 28, 2023

@jazz-y,

 

Thank you!...That's what I needed.

Regards,

Mike