Re: Detect if folder is open/closed
Re: Detect if folder is open/closed
- Subject: Re: Detect if folder is open/closed
- From: email@hidden
- Date: Sat, 11 Apr 2015 21:59:18 +0200
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