Path: ...!news.gegeweb.eu!gegeweb.org!usenet-fr.net!pasdenom.info!.POSTED.lfbn-ren-1-1325-122.w86-229.abo.wanadoo.fr!not-for-mail From: =?UTF-8?B?IkJlbm/DrnQgTC4i?= Newsgroups: fr.comp.sys.mac.communication Subject: Re: =?UTF-8?B?RmVybWV0dXJlIE1hY0NhZsOp?= Date: Thu, 6 Nov 2025 14:02:29 -0000 (UTC) Organization: C'est celui qui dit qui est Archive: no Message-ID: <10ei9pl$e4u$1@rasp.pasdenom.info> References: <10cst8m$no9$1@rasp.pasdenom.info> <10ct0c4$tso$1@rasp.pasdenom.info> <10ct1ak$vl5$1@rasp.pasdenom.info> <10ctg0c$1494r$1@dont-email.me> <10cu3sk$1arj2$1@dont-email.me> <10cvg3b$1lp93$1@dont-email.me> Reply-To: benoit@leraillez.com MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 6 Nov 2025 14:02:29 -0000 (UTC) Injection-Info: rasp.pasdenom.info; posting-account="benoit@usenet"; posting-host="lfbn-ren-1-1325-122.w86-229.abo.wanadoo.fr:86.229.172.122"; logging-data="14494"; mail-complaints-to="abuse@pasdenom.info" User-Agent: MacCafe/3.04.1(4D18) ("kontir wild forest") (macOS 26.1.0 (25B78) - Mac16,8) Cancel-Lock: sha1:e+nuo3EvEMXB8pcGyb81uyAMIt4= sha256:QxUGBPceEC4JQ3wLjlKsMzmDKiOBMt1Z+x2jxO+/FZc= sha1:yR7HCSG9tyMA8yssgFJxvcOMu7A= sha256:9qqFrzSAYH1rRNAFiZ9UpixchQkGtgSrrUz9RiPwhd0= sha1:LPT35g5Aa6BCt2C8qNIz4WqBJo8= sha256:uuIOaczupu2BOpt4EXY+xGIRJ4gseMX8NI6fstRC2OU= X-No-Archive: yes In-Reply-To: <10cvg3b$1lp93$1@dont-email.me> 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-+-