• 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: TextEdit musings (was: (no subject))
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TextEdit musings (was: (no subject))


  • Subject: Re: TextEdit musings (was: (no subject))
  • From: Axel Luttgens <email@hidden>
  • Date: Mon, 16 Feb 2009 12:57:07 +0100

Le 16 févr. 09 à 10:22, emile.a.schwarz a écrit :

Hi all,

before the question, I must say that I gooffed and found what I wrote below.

I wanted to know what kind of data is in the front window: raw text _or_ styled text. I do not found it.
Anyone knows ?

Hello Emile,

Depending on what exactly you are interested in, this one may be of some help; it should set the result to true (resp. false) if the frontmost window is in RTF (resp. text) mode:

tell application "System Events"
	tell application process "TextEdit"
		tell first window
			tell first scroll area
				(count of UI elements) is 3
			end tell
		end tell
	end tell
end tell

No need to say this is clumsy and very likely to break with a future update of TextEdit...
(tested here on 10.5.6)


HTH,
Axel _______________________________________________
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: 
 >(no subject) (From: "emile.a.schwarz" <email@hidden>)

  • Prev by Date: eyeBeam & AppleScript
  • Next by Date: Funny transfer of Applications by email
  • Previous by thread: Re: (no subject)
  • Next by thread: eyeBeam & AppleScript
  • Index(es):
    • Date
    • Thread