🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #14749

[AS] go to next page

#14749
From: Tomi_Saloniemi
Date: Tue, 20 Jan 2004 08:19
33 lines
1995 bytes
How do i tell my script to go to the next page when it is needed?
Now it fails cause the rectangle is created on the start page and ID moves to the next page.

tell application "InDesign 2.0.2"
	set find preferences to nothing
	set change preferences to nothing
	tell active document
		set myStartItems to search for "[IMAGE]"
		set myEndItems to search for "[END]"
		set myStory to parent story of last text frame
		repeat with myCounter from 1 to (count myStartItems)
			set myStartItems to search for "[IMAGE]"
			set myEndItems to search for "[END]"
			set myStartItem to object reference of item 1 of myStartItems
			set myEndItem to object reference of item 1 of myEndItems
			set myStartIndex to (index of character -1 of myStartItem) + 1
			set myEndIndex to (index of character 1 of myEndItem) - 1
			set myimage to characters myStartIndex through myEndIndex of myStory
			tell characters (myStartIndex - 7) through (myEndIndex + 5) of myStory to delete
			try
				set myRectangle to make rectangle with properties {content type:graphic, geometric bounds:{20.0, 20.0, 70, 105}}
				tell myRectangle
					place "omakova:auto:" & myimage as string
					fit given center content
				end tell
			end try
			select myRectangle
			cut clipboard
			select insertion point (myStartIndex - 7) of myStory
			paste
		end repeat
	end tell
end tell
Technical Details
Message-ID: <2ccf76d1.-1@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.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,43c2e9517042a2a2,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2004-01-20 00:37:32 PST
From: Tomi_Saloniemi@adobeforums.com
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: [AS] go to next page
Message-ID: <2ccf76d1.-1@webx.la2eafNXanI>
Date: Tue, 20 Jan 2004 00:19:41 -0800
Lines: 36
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit