Photoshop CS6 running untabbed
Posted: Sat Jun 23, 2012 8:49 am
It seems that there is a magor problem if you are running with:
"Open Documents as Tabs" unticked
Script will stop/give an error.
I am running Windows 7 64bit but it affects both PC and Mac users.
For a workaround on the pc I set this value, process then restore the value back using the following functions..
Code: Select allfunction tabInterface(onOff) {
if(onOff == undefined) onOff=true;
var desc19 = new ActionDescriptor();
var ref8 = new ActionReference();
ref8.putProperty( charIDToTypeID('Prpr'), stringIDToTypeID('interfacePrefs') );
ref8.putEnumerated( charIDToTypeID('capp'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
desc19.putReference( charIDToTypeID('null'), ref8 );
var desc20 = new ActionDescriptor();
desc20.putBoolean( charIDToTypeID('EGst'), true );
desc20.putBoolean( stringIDToTypeID('openNewDocsAsTabs'), onOff );
desc19.putObject( charIDToTypeID('T '), stringIDToTypeID('interfacePrefs'), desc20 );
executeAction( charIDToTypeID('setd'), desc19, DialogModes.NO );
};
function isTabInterface(){
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
return executeActionGet(ref).getObjectValue(stringIDToTypeID('interfacePrefs')).getBoolean(stringIDToTypeID( 'openNewDocsAsTabs'));
};
"Open Documents as Tabs" unticked
Script will stop/give an error.
I am running Windows 7 64bit but it affects both PC and Mac users.
For a workaround on the pc I set this value, process then restore the value back using the following functions..
Code: Select allfunction tabInterface(onOff) {
if(onOff == undefined) onOff=true;
var desc19 = new ActionDescriptor();
var ref8 = new ActionReference();
ref8.putProperty( charIDToTypeID('Prpr'), stringIDToTypeID('interfacePrefs') );
ref8.putEnumerated( charIDToTypeID('capp'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
desc19.putReference( charIDToTypeID('null'), ref8 );
var desc20 = new ActionDescriptor();
desc20.putBoolean( charIDToTypeID('EGst'), true );
desc20.putBoolean( stringIDToTypeID('openNewDocsAsTabs'), onOff );
desc19.putObject( charIDToTypeID('T '), stringIDToTypeID('interfacePrefs'), desc20 );
executeAction( charIDToTypeID('setd'), desc19, DialogModes.NO );
};
function isTabInterface(){
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
return executeActionGet(ref).getObjectValue(stringIDToTypeID('interfacePrefs')).getBoolean(stringIDToTypeID( 'openNewDocsAsTabs'));
};