Article View: adobe.scripting.indesign
Article #20236Re: Select a Story
From: JonDot
Date: Fri, 18 Oct 2002 02:18
Date: Fri, 18 Oct 2002 02:18
33 lines
2145 bytes
2145 bytes
Dave,
Thanks for the response. Unfortunately, I get an error message:
InDesign 2.0.1 got an error: Cant't set find preferences of story " FILE NAME" to nothing. -10006
Here's the whole script:
tell application "InDesign 2.0.1"
set myStory to parent of selection
tell myStory
set find preferences to nothing
set change preferences to nothing
tell document 1
search with find attributes {find text:"/"} with change attributes {change text:"/"}
end tell
set find preferences to nothing
set change preferences to nothing
tell document 1
set theStyle to character style "Superscript"
search with find attributes {find text:"^9^9/"} with change attributes {applied character style:theStyle}
search with find attributes {find text:"^9/"} with change attributes {applied character style:theStyle}
set theStyle to character style "Subscript"
search with find attributes {find text:"/^9^9"} with change attributes {applied character style:theStyle}
search with find attributes {find text:"/^9"} with change attributes {applied character style:theStyle}
set theStyle to character style "Virgule"
search with find attributes {find text:"/"} with change attributes {applied character style:theStyle}
end tell
end tell
end tell
What'd I miss? The script works fine otherwise, but acts on ALL text blocks.
Jon.
Technical Details
Message-ID:
<1de63069.1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!easynet-quince!mango.news.easynet.net!easynet.net!news.shlink.de!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de63069.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,1ba7e41667d1158d X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-10-21 03:59:09 PST From: JonDot <jondot@attbi.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!easynet-quince!mango.news.easynet.net!easynet.net!news.shlink.de!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Select a Story Message-ID: <1de63069.1@WebX.la2eafNXanI> Date: Thu, 17 Oct 2002 19:18:20 -0700 References: <1de63069.-1@WebX.la2eafNXanI> Lines: 41 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit