Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

AppleScript : empty trash ?

2 réponses
Avatar
unbewusst.sein
bon j'ai lu les tn Apple :
<http://docs.info.apple.com/article.html?path=AppleScript/2.1/fr/as1012.
html>
<http://docs.info.apple.com/article.html?path=AppleScript/2.1/fr/as178.h
tml>

et j'ai écrit le petit script d'essai suivant :

tell application "Finder"
set warns before emptying of trash to true
empty trash
end tell

(lancé depuis Editeur AS)

ça ne m'a pas demandé confirmation ???
--
« Je me sens très optimiste quant à l'avenir du pessimisme. »
(Jean Rostand)

2 réponses

Avatar
Patrick Stadelmann
In article <1jioit8.fu3z5e1o2dvqoN%,
(Une Bévue) wrote:

bon j'ai lu les tn Apple :
<http://docs.info.apple.com/article.html?path=AppleScript/2.1/fr/as1012.
html>
<http://docs.info.apple.com/article.html?path=AppleScript/2.1/fr/as178.h
tml>

et j'ai écrit le petit script d'essai suivant :

tell application "Finder"
set warns before emptying of trash to true
empty trash
end tell

(lancé depuis Editeur AS)

ça ne m'a pas demandé confirmation ???



Ca modifie la préférence du Finder quand on vide manuellement la
poubelle. Quand c'est fait depuis un script, il n'y a jamais de
confirmation.

Patrick
--
Patrick Stadelmann
Avatar
unbewusst.sein
Patrick Stadelmann wrote:

Ca modifie la préférence du Finder quand on vide manuellement la
poubelle. Quand c'est fait depuis un script, il n'y a jamais de
confirmation.



Ah d'accord...
--
« Je me sens très optimiste quant à l'avenir du pessimisme. »
(Jean Rostand)