Re: Window title of frontmost application
Re: Window title of frontmost application
- Subject: Re: Window title of frontmost application
- From: Adam Hinshaw <email@hidden>
- Date: Sat, 26 Apr 2003 10:31:22 +1000
This will get it with out reference errors.
--
tell application "System Events"
set fm to (the name of application processes whose frontmost is true) as
text
tell application process fm to return the name of window 1
end tell
--
But i'm not sure how reliable it is, eg in Script Debugger it returns the
"Clippings" window and not the window it is actually running it from. I
believe 'window 1' is the same as the 'front window'.
.adam
on 26/4/03 9:39 AM, 3 at email@hidden wrote:
>
I want to do something like this:
>
>
tell application "System Events"
>
return name of item 1 of (application processes whose frontmost is
>
true)
>
end tell
>
>
But instead of simply returning there, I want to get the title of the
>
frontmost window. Connecting the application process to the window
>
information is what is eluding me. I can't seem to "tell" an
>
application name that is stored in a variable.
>
>
On Friday, Apr 25, 2003, at 18:31 US/Central, John Delacour wrote:
>
> you are talking of Mail.app the windows are back to front, so if
>
> you want the name of the front window, ask for the name of the back
>
> window !
>
>
>
> tell application "Mail" to get the name of the back window
>
>
I seem to be able to get the title of the frontmost by "get the name of
>
the front window" (just saw your correction too, thank you).
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.