Copy link to clipboard
Copied
Why does this keep turning on? I keep going into the History Preferences and unchecking it but it rechecks itself, I believe when I reopen Photoshop. Is there no way to make this permanent?
Copy link to clipboard
Copied
I can't access this via action or script, the best that I can do is either use the "insert menu item command" to put the History Panel "History Options" into an action and then use the Script Events Manager to automatically open this whenever you start Photoshop, then you would manually set it as you wish.
The same menu item can also be accessed via a script for use in the Script Events Manager:
var idselect = stringIDToTypeID( "select" );
var desc898 = new ActionDescriptor();
var idnull = stringIDToTypeID( "null" );
var ref380 = new ActionReference();
var idmenuItemClass = stringIDToTypeID( "menuItemClass" );
var idmenuItemType = stringIDToTypeID( "menuItemType" );
var idhistoryPaletteOptions = stringIDToTypeID( "historyPaletteOptions" );
ref380.putEnumerated( idmenuItemClass, idmenuItemType, idhistoryPaletteOptions );
desc898.putReference( idnull, ref380 );
executeAction( idselect, desc898, DialogModes.ALL );
It is curious that other history options such as "allow non-linear history" are accessible to both DOM and AM code.
app.preferences.nonLinearHistory = true;
// or
var d = new ActionDescriptor();
var r = new ActionReference();
r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("historyPreferences"));
r.putEnumerated(stringIDToTypeID("application"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));
d.putReference(stringIDToTypeID("null"), r);
var d1 = new ActionDescriptor();
d1.putInteger(stringIDToTypeID("nonLinear"), true);
d.putObject(stringIDToTypeID("to"), stringIDToTypeID("historyPreferences"), d1);
executeAction(stringIDToTypeID("set"), d, DialogModes.NO);