• 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: Paul Berkowitz <email@hidden>
  • Date: Tue, 20 May 2003 11:14:31 -0700

On 5/20/03 10:32 AM, "Mitchell, John" <email@hidden> wrote:

> OSX 10.2.5, SD 3.0.6, AS ?? where do I find it?

The simplest way is in any script editor:

AppleScript's version
>
> 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
>
1) When you open the folder, the Finder creates a window for it.
Technically, it's the window that is now open, not the folder. The window is
known by its name, not the full path to the folder.

2) You should not be adding 'as alias'. That forces two coercions where none
is necessary.


tell application "Finder"
set folderPath to "mitchX:Users:johnMitchell:Documents:Review 1, Paris:"
open folder folderPath
set folderName to name of folder folderPath
close window folderName
end tell


--
Paul Berkowitz
_______________________________________________
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: Re: open & close in Finder
  • Next by Date: Re: Format of strings when using run script -- ok, next step
  • Previous by thread: Re: open & close in Finder
  • Next by thread: Go to Chapter of DVD Player
  • Index(es):
    • Date
    • Thread