• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Window title of frontmost application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Window title of frontmost application
      • From: 3 <email@hidden>
    • Re: Window title of frontmost application
      • From: Craig Sutherland <email@hidden>
References: 
 >Re: Window title of frontmost application (From: 3 <email@hidden>)

  • Prev by Date: Re: Window title of frontmost application
  • Next by Date: Re: TIDs and other questions
  • Previous by thread: Re: Window title of frontmost application
  • Next by thread: Re: Window title of frontmost application
  • Index(es):
    • Date
    • Thread