• 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: open & close in Finder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: open & close in Finder


  • Subject: Re: open & close in Finder
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 20 May 2003 11:14:04 -0700

On Tuesday, May 20, 2003, at 10:32 AM, Mitchell, John wrote:

could someone guide me as to why the open works, but the close doesn't

tell application "Finder"
open folder ("mitchX:Users:johnMitchell:Documents:Review 1,
Paris:" as alias)
close folder ("mitchX:Users:johnMitchell:Documents:Review 1, Paris:"
as alias)
end tell

Because you're trying to close a window, not a folder.

This will work:

tell application "Finder"
open folder "mitchX:Users:johnMitchell:Documents:Review 1, Paris"
close window "Review 1, Paris"
end tell

You don't need "as alias" to open it if you have "open folder"; alternatively, you can remove "folder" and keep "as alias". Either way, the parentheses aren't necessary--but like chicken soup, they won't hurt. For that matter, the ending colon is not required either.

--Michelle

--
"There's some good in the world, Mr. Frodo, and it's worth fighting for."
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
References: 
 >open & close in Finder (From: "Mitchell, John" <email@hidden>)

  • Prev by Date: Go to Chapter of DVD Player
  • Next by Date: Re: open & close in Finder
  • Previous by thread: open & close in Finder
  • Next by thread: Re: open & close in Finder
  • Index(es):
    • Date
    • Thread