• 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: closing all but very specific windows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: closing all but very specific windows


  • Subject: Re: closing all but very specific windows
  • From: Nigel Garvey <email@hidden>
  • Date: Fri, 5 Apr 2002 13:57:54 +0100

"Anthony Adachi" wrote on 4 Apr 2002 12:46:04 -0500:

>On Thu, Apr 4, 2002 11:22 AM, Nigel Garvey
><email@hidden> wrote:
>>Nice idea. :-) I haven't tried running this, but your 'close' line seems
>>to be closing *the first n windows*, where n is the number of popup
>>windows you want to close whose index comes *after* the windows you
>>normally want to keep. The first n windows includes at least one that you
>>want to keep.
>>
>>If I've understood your aim correctly, this might be better:
>>
>> tell application "Finder"
>> activate --Finder must be the frontmost app in order to un_pop a pop
>>up window.
>> open items_toKeepOpen_paths
>> set closure_limit to the (count (result as list))
>> tell (every window where (index of it > closure_limit) and (popup of
>>it is true))
>> set the popup to false
>> close
>> end tell
>> end tell
>>
>>NG
>
>Your latest snippet only goes halfway. At least under Mac OS 9.1 and
>AppleScript 1.8.2b3.
>
>While your snippet does "de-pop" the correct pop up windows it doesn't
>close them. In fact, no windows wind up being closed as the result of your
>'close' command statement.
[...]

>However, once the undesirable pop up windows have been de-popped their
>indexes will change. They will become the frontmost windows in the Finder.
>For this reason , we need a statement such as this...

Ah, of course! I see now. De-popping the pop-up windows brings *them* to
the front instead, so closing the first n windows is the right thing to
do. Many apologies.

NG
_______________________________________________
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.

  • Prev by Date: Re: 'aete' & AppleScript suite question
  • Next by Date: Re: URL Encoding
  • Previous by thread: Re: closing all but very specific windows
  • Next by thread: Re: Osaxen not loading at startup
  • Index(es):
    • Date
    • Thread