Article View: adobe.scripting.indesign
Article #15144Re: JS: app.paste() leaves new frame unselected
From: Dave_Saunders
Date: Fri, 02 Jan 2004 15:29
Date: Fri, 02 Jan 2004 15:29
13 lines
1489 bytes
1489 bytes
Aha, you're right. Thanks. Happens that I found a benefit from creating my own frame, so I've instead used: myTempF = app.activeWindow.activeSpread.textFrames.add(); app.selection = myTempF.insertionPoints[0]; app.paste() This allows me to now check that the parentStory of myTempF contains no pageItems. If it does not contain pageItems, then the clipboard was just text and I can proceed on my merry way with this particular script which requires text only on the clipboard -- I'm sure I could equally have tested the nature of the frontmost frame, too, but I doubt it would be much more efficient. Writing that reminded me that I'd better check for an empty clipboard (I'm not sure how to force it to empty for testing -- I wonder if app.paste() pulls a run time error in that case). Dave
Technical Details
Message-ID:
<2ccf29c3.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!webxReferences:
<2ccf29c3.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,b9561af257c0b40d X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2004-01-02 07:37:50 PST From: Dave_Saunders@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: Re: JS: app.paste() leaves new frame unselected Message-ID: <2ccf29c3.1@webx.la2eafNXanI> Date: Fri, 2 Jan 2004 07:29:53 -0800 References: <2ccf29c3.-1@webx.la2eafNXanI> Lines: 21 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit