Re: Detect if folder is open/closed
Re: Detect if folder is open/closed
- Subject: Re: Detect if folder is open/closed
- From: Thomas Fischer <email@hidden>
- Date: Sun, 12 Apr 2015 15:12:53 +0200
Hello,
this and other solutions presented may not quite do what you want when the respective folder window is part of a tabbed window of folders.
If it is not the active tab the script will bring the tab to the front, but it seems that if it is active, the finder will close this and all other tabs of this windows.
Does this matter?
Actually I don't see how Finder tabs can be handled through AppleScript.
Best regards
Thomas Fischer
Am 11.04.2015 um 21:59 schrieb email@hidden:
> Hello.
>
> The line below can be simplified a little, since the path is on the desktop, which is
> Finder’s home directory.
>> set scansFolder to ((path to desktop as text) & "scans~ƒ") as alias
>
> So you could end up with something like this, which is less to type and should at least not
> execute any slower. I have modified Nigel’s clever solution to implement it, if not for anything else than as a proof of concept.
>
> tell application "Finder"
> activate
> set scanWindow to (folder "scans~ƒ")'s container window
> if (scanWindow exists) then
> close scanWindow
> else
> open scanWindow -- or open scansFolder
> end if
> end tell
>
> Regards
>
> Tommy/McUsr
>
>
> _______________________________________________
> 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