🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #10085

Re: How to begin scripting?

#10085
From: Bret_Dupre
Date: Fri, 07 Jul 2006 18:49
30 lines
1702 bytes
Dave,
I did speak to quick. It was hilighting a frame but it was hilighted whether it was overset are not. I tried your last solution but now I get Object is invalid on that new line. Here is the code as I pieced it together. It is also missing a closing bracket which I'm not sure where to insert it.

myDoc = app.activeDocument;
try {
  myName = myDoc.name;
} catch (e) {
  alert("Got an error: " + e);
exit();
}
alert("The active document is named: " + myName)
if (app.documents.length == 0) {
  alert("There are no open documents.");
  exit();
}
myDoc = app.activeDocument;
myOsetList = myDoc.stories.everyItem().overflows;
for (j = 0; myOsetList.length > j; j++); {
  if (myOsetList) {
  // j-th story is overset; tell the user and exit
  selectIt(myDoc.stories[j].textFrames[-1]);
  exit();
}
alert("No stories are overset");
function selectIt(theObj) {
  // Selects object, turns to page and zooms in on it
  app.select(theObj,SelectionOptions.replaceWith);
  app.activeWindow.zoom = ZoomOptions.fitPage;
  app.activeWindow.zoomPercentage = 200
}
Technical Details
Message-ID: <3bbd759f.109@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.volia.net!news.musoftware.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossing
References: <3bbd759f.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,dd9eb181c1e6fc23
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bret_Dupre@adobeforums.com
Newsgroups: adobe.scripting.indesign
Subject: Re: How to begin scripting?
Message-ID: <3bbd759f.109@webcrossing.la2eafNXanI>
Date: Fri, 7 Jul 2006 11:49:27 -0700
References: <3bbd759f.-1@webcrossing.la2eafNXanI>
Lines: 34
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.volia.net!news.musoftware.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossing