AppleScript Inquiry
Lee,
Apologies in advance for our lack of experience in this area, but we tried what you suggested and 5 variations of the original script without success (see actual scripts below):
Script 1 - Entourage launches successfully, but no new message is created
Script 2 - Entourage launches successfully, but script error pops up "The variable pathToFile is not defined"
Script 3 - script does not even launch
Script 4 - Entourage launches successfully, but no new message is created
Script 5 - script does not even launch
Again, this is a photo program where we select one or a number of images and then press the email option. At this point, the script should start by opening Entourage and attaching the image(s) to a blank email; the script should then end and allow the user to add text, title, recipient, send the message.
We are seeking further guidance. Thank you.
--------------------
Script1
on open theList
set SendFileList to {""}
repeat with anItem in theList
set SendFileList to SendFileList & {anItem as alias}
end repeat
tell application "Microsoft Entourage"
activate
set newMessage to (make new outgoing message)
repeat with aFile in theList
make new attachment at newMessage with properties {file:aFile as alias}
end repeat
end tell
end open
--------------------
Script2
on open theList
set SendFileList to {""}
repeat with anItem in theList
set SendFileList to SendFileList & {anItem as alias}
end repeat
tell application "Microsoft Entourage"
activate
set theMessage to make new outgoing message with properties {subject:"This is your file", content:"Attached is your file.", recipient:{address:{address:"somebody@example.com", display name:"I. M. Somebody"}}, attachment:alias pathToFile}
end tell
end open
--------------------
Script3
on open theList
set theList to ""
set SendFileList to {""}
repeat with anItem in theList
set SendFileList to SendFileList & {anItem as alias}
end repeat
set SendFileList to "Cassandra:Users:masahiro_takeda:desktop:test1.txt" as alias
tell application "Microsoft Entourage"
activate
set newMessage to make new draft window with properties {to recipients:"email to @ whom ever", subject:"test mail"}
make new attachment at newMessage with properties {file:SendFileList}
end tell
end open
--------------------
Script4
on open theList
set SendFileList to {""}
repeat with anItem in theList
set SendFileList to SendFileList & {anItem as alias}
end repeat
tell application "Microsoft Entourage"
-- set SendFileList to {"Cassandra:Users:masahiro_takeda:desktop:test.txt" as alias}
-- set SendFileList to {"Cassandra:Users:masahiro_takeda:desktop:test1.txt" as alias} & SendFileList
activate
set newMessage to (make new outgoing message)
repeat with aFile in theList
make new attachment at newMessage with properties {file:aFile as alias}
end repeat
end tell
end open
--------------------
Script5
on open theList
tell application "Microsoft Entourage"
activate
set newMessage to (make new outgoing message)
repeat with aFile in theList
make new attachment at newMessage with properties {file:aFile as alias}
end repeat
end tell
end open