• 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: Extract text from window using system events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Extract text from window using system events


  • Subject: Re: Extract text from window using system events
  • From: Hudson Barton <email@hidden>
  • Date: Tue, 20 Nov 2007 12:27:29 -0500

Thanks. I will get uibrowser I think, because it might be able to solve some other scripting problems I am having.... but first let's try to fix this.... the odd thing is that the essential component of your example actually does not work.

tell application "System Events"
	tell process "Skype"
		windows
	end tell
end tell

result:  {}



You can get the information from Skype directly by using UI element scripting.
There is no need to use preview.app.
UI scripting way is complicated but there is no need to write them by yourself.
Download and try PreFab UI Browser to write UI scripting automatically.
[Auto] line in the fig is generated by PreFab UI Browser.


http://prefabsoftware.com/uibrowser/

<Fig.>
[Auto] activate application "Skype"
[Auto] tell application "System Events"
[Auto] Å@tell process "Skype"
[Auto] Å@Å@-- insert GUI Scripting statements here
Å@Å@Å@Å@Å@set wList to every window whose title begins with "Skype"
Å@Å@Å@Å@Å@if wList = {} then return --return if there is no skype window

Å@Å@Å@Å@Å@Å@ set wItem to item 1 of wList
[Auto] Å@Å@Å@set personNum to value of static text 1 of wItem
[Auto] Å@end tell
[Auto] end tell
</Fig.>

It took three or four minutes to write this sample. It is very easy work with PreFab UI Browser.


_______________________________________________
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: 
 >Extract text from window using system events (From: Hudson Barton <email@hidden>)
 >Re: Extract text from window using system events (From: Takaaki Naganoya <email@hidden>)

  • Prev by Date: RE: Bizarre "can't get class <<bhit>>" error
  • Next by Date: Photoshop CS3 conversions
  • Previous by thread: Re: Extract text from window using system events
  • Next by thread: Re: Extract text from window using system events
  • Index(es):
    • Date
    • Thread