Article View: adobe.scripting.indesign
Article #20746Addressing existing frames fails sometimes
From: Kim Kohen
Date: Wed, 05 Jun 2002 06:46
Date: Wed, 05 Jun 2002 06:46
9 lines
1680 bytes
1680 bytes
I have a problem where ID doesn't seem to be correctly seeing an existing frame. The conditional below always returns false - even when the same text file is selected:
set myfile to (choose file) as text set thelabel to myfile & "foo" tell application "InDesign 2.0.1" tell document 1 if exists (text frame 1 of spread 1 whose label is thelabel) then set myframe to (text frame 1 of spread 1 whose label is thelabel) place myfile on myframe showing options no retaining formatting yes else set myframe to make text frame at page 1 with properties {geometric bounds:{0.3, -109.0, 3.3, 0.0}, label:thelabel} place myfile on myframe showing options no retaining formatting yes end if end tell end tell
However, if I remove 'myfile' from 'thelabel' and simply set thelabel to 'foo' it returns true (as expected) on a second iteration.
Could there be a limitation on the length of a label or can anyone see any other reason why this is failing?
kim
Technical Details
Message-ID:
<ef8ee17.-1@WebX.aaQKaf7vad4>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!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,f88c8b9e5d1d94f2,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-06-05 00:07:27 PST From: "Kim Kohen" <kim@webguide.com.au> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Addressing existing frames fails sometimes Message-ID: <ef8ee17.-1@WebX.aaQKaf7vad4> Date: Tue, 4 Jun 2002 23:46:52 -0700 Lines: 28 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit