Get current Zoom level
Hey!
One simple question, but unfortunately I can't find the answer ![]()
How to get current zoom level with scripting?
I want to rescale image using Percent units to current zoom level.
Thanks!
--
tomaxxi
Hey!
One simple question, but unfortunately I can't find the answer ![]()
How to get current zoom level with scripting?
I want to rescale image using Percent units to current zoom level.
Thanks!
--
tomaxxi
Please try this...
alert(zoomLevel());
function zoomLevel(){
if(!documents.length) return;
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var desc = executeActionGet(ref);
return desc.getDouble(stringIDToTypeID('zoom'))*100;
}
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.