Article View: adobe.scripting.indesign
Article #18103Screen redraw problem?
From: Richard Ronnback
Date: Tue, 22 Apr 2003 05:31
Date: Tue, 22 Apr 2003 05:31
45 lines
2617 bytes
2617 bytes
I wrote a script to walk a user through text frames with overflow. When I run it from the script editor it works as expected but when I run it from InDesign's script palette it doesn't redraw the page/spread correctly. Why is that, and is there any workaround?
Here's the script:
tell application "InDesign 2.0.2"
activate
tell active document
set myIgnoreCheck to text frames whose label is "Ignore"
if (count of myIgnoreCheck) is greater than 0 then
set myIgnoreDialog to display dialog "This document has been checked before, what would you like to do?" buttons {"cancel", "Check new", "Check all"} default button "Check all"
if button returned of myIgnoreDialog is "Check all" then
repeat with i in myIgnoreCheck
set label of i to ""
end repeat
end if
end if
set myOverflows to text frames whose label is "" and overflows is true
if myOverflows is "" then
display dialog "This document has no text overflows"
else
repeat with i in myOverflows
set mySpread to parent of parent of i
set active spread of window 1 to mySpread
select i
tell application "InDesign 2.0.2"
tell active window
zoom given fit spread
end tell
end tell
set myChoice to display dialog "The selected text frame has overflow, what would you like to do? Cancel will let you correct the overflow, Ignore will label this frame so that it is no longer checked. Continue will select the next text frame that has overflow." buttons {"cancel", "ignore", "Continue"} default button "cancel"
if button returned of myChoice is "ignore" then
set label of i to "Ignore"
end if
set myOverflows to (text frames whose overflows is true and label is "")
end repeat
end if
display dialog "The script is finished"
end tell
end tell
Technical Details
Message-ID:
<1de8d1fb.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,fc263da0485886a2,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-04-21 22:38:07 PST From: "Richard Ronnback" <richard.ronnback@telia.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Screen redraw problem? Message-ID: <1de8d1fb.-1@WebX.la2eafNXanI> Date: Mon, 21 Apr 2003 22:31:29 -0700 Lines: 55 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit