• 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
illustrator text box
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

illustrator text box


  • Subject: illustrator text box
  • From: Brian Christmas <email@hidden>
  • Date: Sun, 18 Oct 2009 20:54:32 +1100

G'day scripters

I'm a bit of a novice at scripting Adobe illustrator and have a problem.

I'm trying to add text to graphics, but sometimes the artwork is a small drawing in the middle of a very large document, and everything I can think of puts the text at the top left corner of the document rather than at the top left corner of the actual drawing.

Can anyone advise me please of what to do?

Regards

Santa

tell application "Adobe Illustrator"
set PageOrigin to visible bounds of document 1
delay 0.2
set theText to make new text frame at beginning of document 1 with properties {kind:point text, contents:tempName & "  " & theInitials, position:{(item 1 of PageOrigin) + 1, (item 2 of PageOrigin) + 80}}
--rotate theText angle 90 about top left
delay 0.2
set properties of the text of theText to {text font:text font "Geneva", size:14}
end tell


tell application "Adobe Illustrator"
set PageOrigin to control bounds of page items of document 1
set pagecorner to {(item 1 of item 1 of PageOrigin) + 1, (item 2 of item 1 of PageOrigin) - 80} as list
repeat with x from 1 to count of PageOrigin
if item 1 of item x of PageOrigin < item 1 of pagecorner then
set item 1 of pagecorner to item 1 of item x of PageOrigin
end if
if item 2 of item x of PageOrigin > item 2 of pagecorner then
set item 2 of pagecorner to item 2 of item x of PageOrigin
end if
end repeat
set theText to make new text frame at beginning of document 1 with properties {kind:point text, contents:"test", position:{(item 1 of pagecorner) + 1, (item 2 of pagecorner) + 80}}
--rotate theText angle 90 about top left
set properties of the text of theText to {text font:text font "Geneva", size:14}
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

  • Follow-Ups:
    • Re: illustrator text box
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: How to put logs in console using AppleScript
  • Next by Date: Re: illustrator text box
  • Previous by thread: Re: q
  • Next by thread: Re: illustrator text box
  • Index(es):
    • Date
    • Thread