Re: Bring a window to front
Re: Bring a window to front
- Subject: Re: Bring a window to front
- From: "EU - Luca Pozzato" <email@hidden>
- Date: Mon, 11 Feb 2008 02:24:02 +0100
hi Yyan,
i think this should do the trick…
click menu item n of menu "Window" of menu bar item "Window" of menu bar 1
ciao
Luca
-----Original Message-----
From: KOENIG Yvan <email@hidden>
To: liste AppleScript US <email@hidden>
Date: Sun, 10 Feb 2008 21:21:42 +0100
Subject: Bring a window to front
> 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:
> ografica.it
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
_______________________________________________
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