J'ai cherché ces deux derniers jours et j'ai trouvé quelques applescripts qui prétendaient changer les lignes d'objet. Mais aucun d'entre eux ne semble être capable de changer/définir la ligne d'objet. À votre avis, quelle est l'erreur ?
tell application "Mail"
set theSubjectList to {}
set themessages to selection as list
repeat with msg in themessages
set thisSubject to (subject of msg as string)
if thisSubject is not in theSubjectList then
set theSubjectList to theSubjectList & {thisSubject}
end if
end repeat
set theNewSubject to ¬
(choose from list theSubjectList with prompt ¬
"Choose the subject of the merged thread…") as string
if theNewSubject is in theSubjectList then
repeat with msg in themessages
set subject of msg to (theNewSubject)
end repeat
else
display dialog "Action cancelled"
end if
end tell
J'obtiens l'erreur suivante
error "Mail got an error: Can’t set subject of message to \"CHANGED SUBJECT LINE\"." number -10006 from subject of message