View Single Post
Mark FX

Mark FX's Avatar
Member Since: Aug 13, 2011
Location: West Sussex, UK
Posts: 180
Mark FX has a spectacular aura about

Mark FX is offline
I dont fully understand your question, but I think your asking how to find a specific word in the frontmost active TextEdit document, if this is correct, then the simple Applescript below shows a very basic way to do this.

tell application "System Events"
	set openApps to name of every application process whose visible is equal to true
	if openApps contains "TextEdit" then
		tell application "TextEdit"
			set the wordList to every word of document 1
			if the wordList contains "Hi" then
				return true
				return false
			end if
		end tell
		display alert "The TextEdit application is not running." giving up after 30
	end if
end tell
If this is not what your after, then you had better rephrase your question, and be more clear about what your trying to achieve.

Regards Mark
QUOTE Thanks