Re: Fermeture MacCafé

Liste des GroupesRevenir à fcsm communication 
Sujet : Re: Fermeture MacCafé
De : benoit (at) *nospam* leraillez.com.invalid ("Benoît L.")
Groupes : fr.comp.sys.mac.communication
Date : 06. Nov 2025, 15:02:29
Autres entêtes
Organisation : C'est celui qui dit qui est
Message-ID : <10ei9pl$e4u$1@rasp.pasdenom.info>
References : 1 2 3 4 5 6
User-Agent : MacCafe/3.04.1(4D18) ("kontir wild forest") (macOS 26.1.0 (25B78) - Mac16,8)
Le samedi 18 octobre 2025 à 08:37, Gilbert OLIVIER d'un élan de joie
s'exprima ainsi :


Si cela est possible, on pourrait même intégrer (avec ton accord bien
sûr) cet applet à MacCafé qui se chargerait de sa gestion (lancement
arrêt) en synchro avec lui même.

Voici un bout de script.app qui quitte MacCafé de façon drastique :

tell application "System Events"
  set theID to (unix id of processes whose name is "MacCafé")
  try
    -- Should stop the application with no dialogs and no items saved.
    do shell script "kill -9 " & theID
  end try
end tell

Si je rajoute :
on quit
-- le script
end quit

Alors quand je lance le script il kill MacCafé et quitte. Question :
comment le lancer au shutdown ou le faire tourner indéfiniment en
attendant que le système lui demande de quitter ?



P.S.1 Si le script est dans MacCafé.app et que MacCafé l’exécute quand
on lui demande de quitter alors c’est violent mais si MacCafé ne le
lance qu’après avoir terminé ses lectures/écritures internes alors, d’un
certain point de vue, MacCafé kill 4D.

P.S.2 Si le script est dans MacCafé.app alors il doit connaître le nom
de l’application MacCafé (genre MacCafé béta3.app) et utiliser ce nom
dans la variable theID

tell application "Finder"
  set AppleScript's text item delimiters to ":"
  set myPathText to container of (path to me) as text
  set myPathList to text items of myPathText as list
  set listSize to count items of myPathList
  set benoit to listSize - 1
  set theID to item benoit of myPathList as text
  set AppleScript's text item delimiters to ""
  tell application "System Events"
    set theID to (unix id of processes whose name is "MacCafé")
    try
      do shell script "kill -9 " & theID
    end try
  end tell
end tell


--
La prétention est à la connerie, ce que la mousse est à la bière.
-+-Albert Simonin-+-


Date Sujet#  Auteur
17 Oct 25 * Fermeture MacCafé22Ruprecht
17 Oct 25 +* Re: Fermeture MacCafé16DV
17 Oct 25 i+* Re: Fermeture MacCafé12Ruprecht
17 Oct 25 ii`* Re: Fermeture MacCafé11Gilbert OLIVIER
17 Oct 25 ii `* Re: Fermeture MacCafé10Joseph B
18 Oct 25 ii  `* Re: Fermeture MacCafé9Gilbert OLIVIER
18 Oct 25 ii   +* Re: Fermeture MacCafé7M.V.
18 Oct 25 ii   i`* Re: Fermeture MacCafé6Joseph B
18 Oct 25 ii   i `* Re: Fermeture MacCafé5M.V.
6 Nov 25 ii   i  `* Re: Fermeture MacCafé4Brice
7 Nov 25 ii   i   `* Re: Fermeture MacCafé3Chris
7 Nov 25 ii   i    `* Re: Fermeture MacCafé2M.V.
7 Nov 25 ii   i     `- Re: Fermeture MacCafé1Brice
6 Nov 25 ii   `- Re: Fermeture MacCafé1"Benoît L."
17 Oct 25 i`* Re: Fermeture MacCafé3Gilbert OLIVIER
17 Oct 25 i `* Re: Fermeture MacCafé2DV
17 Oct 25 i  `- Re: Fermeture MacCafé1Gilbert OLIVIER
30 Oct 25 `* Re: Fermeture MacCafé5Ruprecht
30 Oct 25  `* Re: Fermeture MacCafé4DV
30 Oct 25   +* Re: Fermeture MacCafé2DV
31 Oct 25   i`- Re: Fermeture MacCafé1M.V.
31 Oct 25   `- Re: Fermeture MacCafé1M.V.

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal