• 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
Close all windows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Close all windows


  • Subject: Close all windows
  • From: Christopher MJ Tangora <email@hidden>
  • Date: Wed, 11 Feb 2004 16:05:01 -0500

I am having one heck of a time getting a finder window to close. Everything I see says that this should work...

tell application "finder"
close every window
end tell


but when I run the script I get an error saying

Finder got an error: Some parameter is missing for close.


The extra odd part is when I record from finder that is the instructions I get... close every window.
Aside from using a keystroke to close every window, how can I close every window?


I just want to close every window open in the Finder. I have tried the script above and this script...

tell application "Finder"
activate
set open_windows to count of windows
delay 1
repeat with i from 1 to open_windows
close window i
end repeat
end tell


Both of these scripts come back with the previously mentioned error. Is this problem isolated to my local machine, or is this system wide?

My local machine is a dual 1.25 GHz G4 running OS X.3.


Thanks.





Chris Tangora

Desktop Specialist
Production Services
Daytona Beach News-Journal Corporation
Daytona Beach, Florida
_______________________________________________
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.

  • Follow-Ups:
    • Re: Close all windows
      • From: Emmanuel <email@hidden>
    • Re: Close all windows
      • From: "j.e.b." <email@hidden>
    • Re: Close all windows
      • From: Michelle Steiner <email@hidden>
    • Re: Close all windows
      • From: Bruce Carter <email@hidden>
  • Prev by Date: Finding out is an Application is running
  • Next by Date: Re: Get AppleScript directory
  • Previous by thread: Re: Finding out is an Application is running
  • Next by thread: Re: Close all windows
  • Index(es):
    • Date
    • Thread