This script works but look at the 2nd one…
set NoMessage to 1
set ImageAttach to alias "Macintosh HD:Users:nicholassmith:Documents:MusicImages:June 92E.jpg"
tell application "Mail"
if NoMessage = 1 then
set theNewMessage to make new outgoing message with properties {subject:"Album", content:"jh", visible:true}
set NoMessage to 0
end if
tell content of theNewMessage
make new attachment with properties {file name:ImageAttach} at after last paragraph
end tell
end tell
My actual script is like this:
Notice the path is different I have variables now but I don’t understand why it doesn’t work anymore. I think it breaks it up into different text items or something.
set NoMessage to 1
set ImageAttach to alias "Macintosh HD:Users:nicholassmith:Documents:MusicImages:" & TheMonth & i & "2E.jpg"
tell application "Mail"
if NoMessage = 1 then
set theNewMessage to make new outgoing message with properties {subject:"Album", content:"jh", visible:true}
set NoMessage to 0
end if
tell content of theNewMessage
make new attachment with properties {file name:ImageAttach} at after last paragraph
end tell
end tell