Re: Set type preferences in InDesign
Re: Set type preferences in InDesign
- Subject: Re: Set type preferences in InDesign
- From: Steve Suranie <email@hidden>
- Date: Thu, 17 Nov 2005 07:54:59 -0500
- Thread-topic: Set type preferences in InDesign
Thanks Shane, the 'type' entry was a typo, I was using text.
But following your suggestion did work. But I didn't get the results I was
hoping for.
I was hoping to convert all the existing quotes from typographer quotes to
standard quotes (I'm trying to move the text from InDesign to an XML file
but the smart quotes keep breaking the file) but changing the preferences
seems to only affect what will get typed after the change, not prior to it.
I'm thinking I have to do a find and replace in ID once I change the
preference to get all quotes changed. Does anyone have a different
suggestion?
I've tried finding and replacing the smart quotes by using ASCII characters
and AS but the script doesn't ever seem to pick them up. (I don't think 147
and 148 are the right characters though)
--cleaning up left smart quotes
set thisArticle to my findAndReplace(ASCII character 147, "“",
thisArticle)
--cleaning up right smart quotes
set thisArticle to my findAndReplace(ASCII character 148, "”",
thisArticle)
--subroutines--
--this script was found on Macscripter.net
on findAndReplace(tofind, toreplace, TheString)
try
if tofind = "" then
set tofind to ASCII character 13
end if
set OAD to text item delimiters
set text item delimiters to tofind
set textItems to text items of TheString
set text item delimiters to toreplace
if (class of TheString is string) then
set res to textItems as string
else
set res to textItems as Unicode text
end if
set text item delimiters to OAD
on error errMsg
display dialog "Error in converting Mac characters to HTML" & return
& return & errMsg
end try
return res
end findAndReplace
On 11/16/05 3:47 PM, "Shane Stanley" <email@hidden> wrote:
> On 17/11/05 2:02 AM, "Steve Suranie" <email@hidden> wrote:
>
>> I¹m trying to change/set the typographers quotes in the type preferences of
>> Adobe Indesign to off.
>>
>> If I use this code it works fine,
>>
>> tell application ³Adobe InDesign CS2²
>> set typographers quotes of type preferences to false
>> end tell
>
> That will work if you change "type" to "text".
>>
>> but if I do it anywhere in relation to a document it doesn¹t work:
>>
>> tell application ³Adobe InDesign CS2²
>>
>> set typographers quotes of type preferences to false
>>
>> open indesignFileNAme as alias
>> tell front document
>> set pageCount to count of every page
>> end tell
>>
>> end tell
>
> You haven't set it for the document, though -- try:
>
> tell application ³Adobe InDesign CS2²
> open indesignFileNAme as alias
> tell front document
> set typographers quotes of text preferences to false
> set pageCount to count of every page
> end tell
> end tell
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden