Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 142955

Re: Re: A little change is required in the script, please help.

$
0
0

Hi,

 

Some modifications:

zoomToScale( Number(prompt("Set a zoom scale (5-4000)")) );

function zoomToScale(myScale) {
  if (isNaN(myScale) || myScale > 4000 || myScale < 5) myScale = 100;  var  window = app.activeWindow,  mDoc = app.activeDocument,  mZeroPoint = mDoc.zeroPoint,  mHorizViewPrefs = mDoc.viewPreferences.horizontalMeasurementUnits,  mActivePage = window.activePage,  theRec, mTopCenter;  mDoc.zeroPoint = [0,0];  mDoc.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;  theRec = mActivePage.rectangles.add();  mTopCenter = (mActivePage.bounds[3] - mActivePage.bounds[1]) / 2;  theRec.move(undefined,[mTopCenter,0]);  window.zoom(ZoomOptions.fitSpread);  window.zoomPercentage = myScale;  app.selection = theRec;  theRec.remove();    mDoc.zeroPoint = mZeroPoint;  mDoc.viewPreferences.horizontalMeasurementUnits = mHorizViewPrefs;
}

 

Jarek


Viewing all articles
Browse latest Browse all 142955

Trending Articles



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