• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Scripting InDesign CS3 & 4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scripting InDesign CS3 & 4


  • Subject: Scripting InDesign CS3 & 4
  • From: Curt Schultz <email@hidden>
  • Date: Thu, 29 Oct 2009 16:30:43 -0700


Hi List,

I am relatively new to AppleScript and by new I mean that I have never used it for, or scripted anything of significance.

I was asked if I could update a script that was written for InDesign CS2 so that it would work in InDesign CS4. Not being a scripting guru and never wring anything close to this, I figured that I would give it a try (maybe even learn something). Anywhoo, the script that I am working on needs to search within the Paragraph and Character style "groups" (nested folders) to find/change the style name. In CS2 there were no style groups so when the script is run in CS3 it doesn't search/replace within the Paragraph and Character Style groups (folders), it only searches outside of the nested folders.

here is part of the script:

--This list is for paragraph styles
set myPStyleList to {¬
{"Must be last line in squiggely braces", "Do not touch", "n"} ¬
}

--Clean up style lists by removing last "squiggely braces" item
set myPStyleList to items 1 thru ((length of myPStyleList) - 1) of myPStyleList

tell application "Adobe InDesign CS3"
tell active document
set successPCounter to 0
set successPDelete to 0
set successCCounter to 0
set successCDelete to 0
set notedErrorCounter to 0

--Do paragraph styles
repeat with thisPStyle in myPStyleList
set newPStyle to item 1 of thisPStyle
set oldPStyle to item 2 of thisPStyle
set noteError to item 3 of thisPStyle
set docPStyles to (name of every paragraph style whose name does not start with "[")
if docPStyles contains newPStyle then
if docPStyles does not contain oldPStyle then

I thought that if I changed the line 
set docPStyles to (name of every paragraph style whose name does not start with "[")

to
set docPStyles to (name of all paragraph styles whose name does not start with "[")

that there would be joy. Alas there was no joy to be had and I received the following message:
WARNING
Can't get name of all paragraph styles of active document of application "Adobe InDesign CS3" whose not 32. Access not allowed.

I would greatly appreciate any assistance in figuring this out.

Thank you,
Curt







 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Scripting InDesign CS3 & 4
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: AppleScript-Users Digest, Vol 6, Issue 558
  • Next by Date: Re: Scripting InDesign CS3 & 4
  • Previous by thread: Re: AppleScript-Users Digest, Vol 6, Issue 558
  • Next by thread: Re: Scripting InDesign CS3 & 4
  • Index(es):
    • Date
    • Thread