Re: Extract text from window using system events
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