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: Takaaki Naganoya <email@hidden>
- Date: Tue, 20 Nov 2007 10:28:09 +0900
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.
--
Takaaki Naganoya
Piyomaru Software
http://piyo.piyocast.com
email@hidden
PiyoCast Web (Podcasting with Music!)
http://www.piyocast.com
On 2007/11/20, at 9:56, Hudson Barton wrote:
I need to extract a particular string from the main window in
Skype. The information is the total # of people currently online,
for which there is no tool in the Skype API. Seemingly, the only
way to do it is as follows: Cmd. "P" (print) the Skype window
using the "Preview" option button... this puts the desired text
into preview window. Then extract the desired text.
I am not proficient with UI system events. Specifically, I don't
know how to script the process of creating the "preview" window and
then extracting the text. Please help.
_______________________________________________
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