Je suis en train d'écrire un Applescript afin de pouvoir attacher un fichier à Outlook depuis le terminal de la manière suivante:
$ attachToOutlook myreport.xlsx
Où attachToOutlook
est un alias pour osascript /chemin/vers/mon/script/attach
Voici ma mise en œuvre actuelle:
on run argv
tell application "Microsoft Outlook"
set theContent to ""
set theAttachment to item 1 of argv
set theMessage to make new outgoing message with properties {subject: ""}
tell content
make new attachment with properties {file: (item 1 of argv )} at the end of theMessage
end tell
open theMessage -- pour une édition ultérieure
end tell
end run
mais je reçois l'erreur suivante:
attach:263:264: erreur de script: Expression attendue, etc. mais trouvé “:”. (-2741)
Comment puis-je corriger cela?