• 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: name of target of front window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: name of target of front window


  • Subject: Re: name of target of front window
  • From: John <email@hidden>
  • Date: Sat, 29 Sep 2012 18:29:25 -0400

This should return the correct name of search windows as well:

tell application "Finder"
    set theFolderName to name of front window
    if theFolderName starts with "Searching “" then set theFolderName to text 12 thru -2 of theFolderName
    return theFolderName
end tell

On Sat, Sep 29, 2012 at 4:56 PM, Ronald Hofmann <email@hidden> wrote:
Hi all,
I´m trying a Finder tool with Objective-C and need to know if there is an Finder window open at a certain point of time.

Right now I´m using this:
tell application "Finder"
set theFolderName to name of target of front window
end tell

But this only works if the front window is a normal window.
If the front window is a search window  theFolderName  remains empty.
If the front window is a Info window I receive an error.

I wonder if there is another way to distinguish between these different window types but without success so far.


Greetings from Switzerland, Ronald Hofmann
---

 _______________________________________________
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


 _______________________________________________
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

References: 
 >name of target of front window (From: Ronald Hofmann <email@hidden>)

  • Prev by Date: Re: name of target of front window
  • Next by Date: Re: Weird message saving to desktop
  • Previous by thread: Re: name of target of front window
  • Next by thread: re: name of target of front window
  • Index(es):
    • Date
    • Thread