• 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 15:51:44 -0500

Never mind.  Figured it out. :) Thanks. Will order your "uibrowser".




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
--

Hudson Barton     http://www.glimfeather.com
8313 Poplar Grove Circle, Waxhaw, NC  28173
Office: 704-765-1972  Cell: 610-348-4371  Home: 704-843-1421
_______________________________________________
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
  • Prev by Date: Re: Applescript schedulers
  • Next by Date: Init Caps Handler
  • Previous by thread: Re: Extract text from window using system events
  • Next by thread: simple problem?
  • Index(es):
    • Date
    • Thread