Article View: adobe.scripting.indesign
Article #9297Re: Wait for user to select an object
From: Eric
Date: Fri, 25 Aug 2006 18:11
Date: Fri, 25 Aug 2006 18:11
25 lines
1359 bytes
1359 bytes
Here's a massively kludgey way to do it in AS, but it involves a dialog box popping up every 3 seconds if they don't select text in time... :-/ tell application "Adobe InDesign CS2" tell active document set stillWaiting to true set mySel to "" repeat while stillWaiting try set mySel to text of selection end try if length of mySel > 0 then set stillWaiting to false else display dialog "Select some text" --Stop running the script for 3 seconds to give them a chance to do it delay 3 end if end repeat display dialog mySel end tell end tell
Technical Details
Message-ID:
<3bc1610c.2@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!syros.belnet.be!news.belnet.be!news.stben.net!webcrossingReferences:
<3bc1610c.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,6be581286abdf7df X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: Eric_@_MCA@adobeforums.com Newsgroups: adobe.scripting.indesign Subject: Re: Wait for user to select an object Message-ID: <3bc1610c.2@webcrossing.la2eafNXanI> Date: Fri, 25 Aug 2006 11:11:31 -0700 References: <3bc1610c.-1@webcrossing.la2eafNXanI> Lines: 26 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!syros.belnet.be!news.belnet.be!news.stben.net!webcrossing