tell application "Finder"
set fileNames to list folder "Macintosh HD:Users:juliendelprat:Library:Scripts"
if fileNames contains "Activer l'accusé.scpt" then
do shell script "defaults delete com.apple.mail UserHeaders"
set name of document file "Activer l'accusé.scpt" of folder "Scripts" of folder "Library" of folder "juliendelprat" of folder "Users" of disk "Macintosh HD" to "Désactiver l'accusé.scpt"
display dialog "Accusé activé" giving up after 1
else
if fileNames contains "Désactiver l'accusé.scpt" then
do shell script "defaults write com.apple.mail UserHeaders '{\"Disposition-Notification-To\" = \"[email protected]\"; }'"
set name of document file "Désactiver l'accusé.scpt" of folder "Scripts" of folder "Library" of folder "juliendelprat" of folder "Users" of disk "Macintosh HD" to "Activer l'accusé.scpt"
display dialog "Accusé desactivé" giving up after 1
else
display dialog "Erreur : l'accusé de réception n'a pas été modifié"
end if
end if
end tell