[macOs] depuis les màj 115, impossible de piloter TB via un script -compose.
Alors que cela fonctionne avec les versions 102.
Une astuce ?
merci pour le retour
----------
Code : Tout sélectionner
on run
tell application "Finder"
set finderitems to (selection as list)
end tell
set filepaths to {}
repeat with finderitem in finderitems
set iteminfo to info for (finderitem as alias)
if not folder of iteminfo then
set filepaths to filepaths & (POSIX path of (finderitem as Unicode text))
end if
end repeat
my send_mail("Mon objet", "Mon texte : Hello and Good Bye!", "expediteur@expediteur.com", "contactRetenu@client.com", filepaths)
end run
on send_mail(email_subject, email_message, email_sender, email_recipient, email_files)
try
set thunderbird_bin to "/Applications/Thunderbird.app/Contents/MacOS/thunderbird-bin -compose "
set email_subject to "subject=" & email_subject
set email_recipient to "to=" & email_recipient
set email_message to "body=" & email_message
set attachments to "attachment='"
repeat with a_file in email_files
if a_file as string is (last item of email_files) then
set attachments to attachments & "file://" & a_file
else
set attachments to attachments & "file://" & a_file & ","
end if
end repeat
set arguments to email_subject & "," & email_recipient & "," & email_message & "," & attachments & "'"
do shell script thunderbird_bin & quoted form of arguments
on error error_message number error_number
log error_message & " " & error_number
end try
end send_mail
[modération]
Pour ce genre d'information, merci d'utiliser les balises code (bouton </> ).
Les balises code ont donc été ajoutées pour une meilleure lisibilité.
[/modération]lool-lauris