Zooming changing Photoshop image windows size is a Photoshop preference. You can set it either way in and actions and scripts. And you can use menu items in actions and scripts like the zoom in and zoom out and view actual pixels. Some other menu items also change Photoshop image windows size like fit on screen and full screens mode.
#target photoshop
//
// test.jsx
//
//
// Generated Tue Jan 15 2019 22:43:36 GMT-0500
//
cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };
//
// Test
//
//
//==================== TestAction ==============
//
function TestAction() {
// Set
function step1(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putProperty(cTID('Prpr'), sTID("toolsPreferences"));
ref1.putEnumerated(cTID('capp'), cTID('Ordn'), cTID('Trgt'));
desc1.putReference(cTID('null'), ref1);
var desc2 = new ActionDescriptor();
desc2.putBoolean(cTID('RWOZ'), false);
desc1.putObject(cTID('T '), sTID("toolsPreferences"), desc2);
executeAction(cTID('setd'), desc1, dialogMode);
};
// Set
function step2(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putProperty(cTID('Prpr'), sTID("toolsPreferences"));
ref1.putEnumerated(cTID('capp'), cTID('Ordn'), cTID('Trgt'));
desc1.putReference(cTID('null'), ref1);
var desc2 = new ActionDescriptor();
desc2.putBoolean(cTID('RWOZ'), true);
desc1.putObject(cTID('T '), sTID("toolsPreferences"), desc2);
executeAction(cTID('setd'), desc1, dialogMode);
};
// Select
function step3(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putEnumerated(cTID('Mn '), cTID('MnIt'), cTID('ZmIn'));
desc1.putReference(cTID('null'), ref1);
executeAction(cTID('slct'), desc1, dialogMode);
};
// Select
function step4(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putEnumerated(cTID('Mn '), cTID('MnIt'), cTID('ZmIn'));
desc1.putReference(cTID('null'), ref1);
executeAction(cTID('slct'), desc1, dialogMode);
};
// Select
function step5(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putEnumerated(cTID('Mn '), cTID('MnIt'), cTID('FtOn'));
desc1.putReference(cTID('null'), ref1);
executeAction(cTID('slct'), desc1, dialogMode);
};
// Select
function step6(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putEnumerated(cTID('Mn '), cTID('MnIt'), cTID('ZmOt'));
desc1.putReference(cTID('null'), ref1);
executeAction(cTID('slct'), desc1, dialogMode);
};
// Select
function step7(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putEnumerated(cTID('Mn '), cTID('MnIt'), sTID("screenModeFullScreenWithMenubar"));
desc1.putReference(cTID('null'), ref1);
executeAction(cTID('slct'), desc1, dialogMode);
};
// Select
function step8(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putEnumerated(cTID('Mn '), cTID('MnIt'), sTID("screenModeFullScreen"));
desc1.putReference(cTID('null'), ref1);
executeAction(cTID('slct'), desc1, dialogMode);
};
// Select
function step9(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putEnumerated(cTID('Mn '), cTID('MnIt'), sTID("screenModeStandard"));
desc1.putReference(cTID('null'), ref1);
executeAction(cTID('slct'), desc1, dialogMode);
};
step1(); // Set
step2(); // Set
step3(); // Select
step4(); // Select
step5(); // Select
step6(); // Select
step7(); // Select
step8(); // Select
step9(); // Select
};
// EOF
"test.jsx"
// EOF