• 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
Font, size, and color
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Font, size, and color


  • Subject: Font, size, and color
  • From: Graff <email@hidden>
  • Date: Tue, 13 Jan 2004 19:52:33 -0500

I've been trying to get the font, size of the font, and color of text in Script Editor.app. I have no problem getting the text of a document, and I can even break the text down into "attribute runs" but I've failed every single time I've tried to get the properties of an attribute run. Here's an example that doesn't work:
------------
tell application "Script Editor"
set documentList to every document whose name is "foo.scpt"
set theText to text of item 1 in documentList
set thisRun to attribute run 1 of theText

set theSize to size of thisRun
set theFont to font of (thisRun as attribute run)
set theColor to color of character 1 of thisRun
end tell
------------

Anyone have any idea on how to do this?

- Ken
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Font, size, and color
      • From: Emmanuel <email@hidden>
  • Prev by Date: Adding a "reply to" header to an email
  • Next by Date: Text Selection in Mail.app
  • Previous by thread: Adding a "reply to" header to an email
  • Next by thread: Re: Font, size, and color
  • Index(es):
    • Date
    • Thread