🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #20355

Re: Apply character style to chosen characters? (AS)

#20355
From: JonDot
Date: Thu, 25 Jul 2002 20:20
15 lines
1645 bytes
I must be doing something different here; this script doesn't work for me. 

tell application "InDesign 2.0.1" 
�set find preferences to nothing 
�set change preferences to nothing 
�tell document 1 
��set theStyle to character style "Time" 
��search document 1 with find attributes {find text:"^9"} with change 
attributes {applied character style:theStyle} 
�end tell 
end tell 

What I want to do is move all parenthesis marks up one point so they take a more aesthetic postion in relation to the surrounding text. I created a Character Style "Parenthesis UP" and replaced "Time" above and the "^9" with ")" to get started.  Right off, the ":" in  {applied character style:theStyle} was listed as an error in AppleScript. I changed it to a comma and it passed Check Syntax. 
Then I go to InDesign, run the script and I get "InDesign 2.0.1 got an error: Can't get document 1. error -1728 
What am I missing?
Technical Details
Message-ID: <ef97992.4@WebX.aaQKaf7vad4>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <ef97992.-1@WebX.aaQKaf7vad4>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f939a,e7eb9c0f57bd6ad2
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-07-25 13:41:40 PST
From: JonDot <jondot@attbi.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Apply character style to chosen characters? (AS)
Message-ID: <ef97992.4@WebX.aaQKaf7vad4>
Date: Thu, 25 Jul 2002 13:20:56 -0700
References: <ef97992.-1@WebX.aaQKaf7vad4>
Lines: 22
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit