• 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: Detect if folder is open/closed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Detect if folder is open/closed
      • From: Thomas Fischer <email@hidden>
References: 
 >Re: Detect if folder is open/closed (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: Detect if folder is open/closed
  • Next by Date: Re: Detect if folder is open/closed
  • Previous by thread: Re: Detect if folder is open/closed
  • Next by thread: Re: Detect if folder is open/closed
  • Index(es):
    • Date
    • Thread