🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #18106

Screen redraw problem?

#18106
From: Richard Ronnback
Date: Tue, 22 Apr 2003 16:43
45 lines
2648 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: <1de8d3b0.-1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,fc263da0485886a2
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-04-22 10:07:58 PST
From: "Richard Ronnback" <richard.ronnback@telia.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Screen redraw problem?
Message-ID: <1de8d3b0.-1@WebX.la2eafNXanI>
Date: Tue, 22 Apr 2003 09:43:27 -0700
Lines: 55
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit