Bring a window to front
Bring a window to front
- Subject: Bring a window to front
- From: KOENIG Yvan <email@hidden>
- Date: Sun, 10 Feb 2008 21:21:42 +0100
Hello
It seems that I am tired.
I'm unable to find the way to bring a Number's window to front so the
script would be able to save every open doc.
Here is the script:
--[SCRIPT]
set theApp to "Numbers"
tell application "System Events" to set theAppIsRunning to (name of
processes) contains theApp
if theAppIsRunning = true then
tell application theApp to activate
tell application "System Events" to tell application process theApp
set nw to get name of every window
repeat with n in nw
if subrole of (get properties of window n) is "AXStandardWindow" then
(* Here, I try to bring window n to front *)
my saveDoc(theApp)
end if
end repeat
end tell -- process…
end if -- if theAppIsRunning …
on saveDoc(theApp)
tell application "System Events" to tell application process theApp
to keystroke "s" using {command down}
end saveDoc
--[/SCRIPT]
Is one of you able to open my eyes ?
Thanks in advance.
I will read you tomorrow.
Yvan KOENIG _______________________________________________
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