Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Set zoom in CS5

$
0
0

We've been using the below Java code to set the zoom of a document in Photoshop 7 (yeah, I know - ancient) to fit the screen (like hitting Ctrl + 0 on the PC) but it no longer works in CS6. The runMenuItem command is generating "Error 1242: Illegal argument - argument 1."

 

 

function runMenuItem(item){// from xbytor
cTID = function(s) {return charIDToTypeID(s); };
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putEnumerated( cTID( "Mn  " ), cTID( "MnIt" ), cTID( item ) );
desc.putReference( cTID( "null" ), ref );
executeAction( cTID( "slct" ), desc, DialogModes.NO );}
runMenuItem("FtOn");// fit on screen ( same as ctrl-0 )

 

Is there some other way this can to be done in CS6?

 

Thanks,

Ken


Viewing all articles
Browse latest Browse all 27456

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>