• 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
Re: Illustrator CS5.1 color conversion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Illustrator CS5.1 color conversion


  • Subject: Re: Illustrator CS5.1 color conversion
  • From: Brian Christmas <email@hidden>
  • Date: Wed, 21 Nov 2012 13:10:53 +1100

Title: Re: Illustrator CS5.1 color conversion
Brad, bit remiss of me for not noticing it, but this script will also greyscale the text in text frames.

Regards

Santa


On 21/11/2012, at 12:16 PM, "Houston, Brad" <email@hidden> wrote:

Hey Brian, thanks.

Other work overwhelmed me, thus I just caught up with your ever more developed responses. The system events approach I was not familiar with, but I’ll be all over it now. The holes in the applescript for Illustrator was driving me nuts; this approach can plug them all. Awesome!

Brad

tell application "Adobe Illustrator"
activate
tell current document
set theCount to (count of layers) as text
set theProperties to {}
repeat with EachLayer from 1 to theCount
if EachLayer > 1 and EachLayer < theCount then
set theProperties to page items of layer EachLayer
repeat with EachItem from 1 to count of theProperties
set selection to item EachItem of page items of layer EachLayer
tell application "System Events" to tell process "Illustrator"
try
click menu item "Convert to Grayscale" of menu 1 of menu item "Edit Colors" of menu 1 of menu bar item "Edit" of menu bar 1
end try
end tell
end repeat
set theProperties to text frames of layer EachLayer
repeat with EachItem from 1 to count of theProperties
set selection to text range of item EachItem of text frames of layer EachLayer
tell application "System Events" to tell process "Illustrator"
try
click menu item "Convert to Grayscale" of menu 1 of menu item "Edit Colors" of menu 1 of menu bar item "Edit" of menu bar 1
end try
end tell
end repeat
end if
end repeat
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:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: Illustrator CS5.1 color conversion (From: "Houston, Brad" <email@hidden>)

  • Prev by Date: Re: Illustrator CS5.1 color conversion
  • Next by Date: Re: Illustrator CS5.1 color conversion
  • Previous by thread: Re: Illustrator CS5.1 color conversion
  • Next by thread: Re: Illustrator CS5.1 color conversion
  • Index(es):
    • Date
    • Thread