🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fr.comp.sys.mac.programmation
Article #1

Re: [MacCafé] Fermer toutes les fenêtres en AppleScript

#1
From: Joseph B
Date: Tue, 13 Oct 2026 15:58
35 lines
2567 bytes
Hi,
M.V., le mardi 13 octobre 2026, a écrit dans
message <11alend$2as$1@rasp.pasdenom.info> :

> allait fermer toutes les fenêtres (sauf la fenêtre Profil) mais ça ne
> ferme que celle en avant-plan. 😫

Dans la mesure où la commande "fermer" { ⌘ w } n'est même pas présente
dans les menus de MacCafé, il y avait peu de chance qu'une émulation de
raccourci de menu {Opt-Cmd-W} nous fît la surprise de fonctionner 👎

Pas d'autre solution que de passer les fenêtres ouvertes dans une boucle
pour les fermer une à une en évitant la "Base".
Mais autant que je sache tu as un script fait cela très bien, non ?

Tiens, pour le fun, une nouvelle variante

##########
tell application "MacCafé" to activate
tell application "System Events"
  tell application process "MacCafé"
    set NbWindows to count of windows
    repeat with i from NbWindows to 1 by -1
      if (length of ((name of window i) as string)) < 3 then
        click button 1 of window i
        delay 0.05
      end if
    end repeat
  end tell
end tell
#########

-- 
🥳/ josephB \🦶
Technical Details
Message-ID: <11alkeq$m9r3$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11alend$2as$1@rasp.pasdenom.info>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Joseph B <joseph@nowhere.invalid>
Newsgroups: fr.comp.sys.mac.programmation
Subject: Re: [MacCafé] Fermer toutes les fenêtres en AppleScript
Date: Tue, 13 Oct 2026 15:58:18 -0000 (UTC)
Organization: Bof…
Lines: 35
Message-ID: <11alkeq$m9r3$1@dont-email.me>
References: <11alend$2as$1@rasp.pasdenom.info>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 13 Oct 2026 15:58:18 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="730979"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/2EAUFthugCVKrb1wddXF0bIFEUrlfFyg="; posting-host="991e0ad882ca66cf007adeb8a5adf8de"
User-Agent: MacCafe/3.06(4D18) ("arusha") (macOS 26.7.1 (25G241) - Mac14,3)
Cancel-Lock: sha1:FOemY3xODTkNSFmomAl0hi+AZoc= sha256:hHPfknxHpOAZuPc3O6Qzd8CRbG/YdEoPr62jOfAlndU=
	sha1:nPbjd51XtKto26jlCVKqO97BhZA= sha256:8Gd6PKnMkHLMIKq2sB9npgxXS2Mjm2wJNLEbtZbjUhc=
	sha1:+6Tw0PVETkvMhIqxCO2G7FRfL2g= sha256:ACoRkWpGPhqGq1XVoz1pwc8qEhe9ziVOWK3yOheV0lk=
In-Reply-To: <11alend$2as$1@rasp.pasdenom.info>
X-No-Archive: yes