Re: name of target of front window
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