• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: 'Make new attachment' dilemma
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'Make new attachment' dilemma


  • Subject: Re: 'Make new attachment' dilemma
  • From: Brian Christmas <email@hidden>
  • Date: Tue, 26 May 2015 19:48:00 +1000

Thanks Chris, and sorry for missing that crucial line Yvan.

As Mail is difficult to add extra paragraphs to after creation, I resorted to adding 8 blank lines at the end of the content before making the new message in each of my 9 cases that I use.

Then, simply using the following script, everything was added as required.

Thanks for the input, especially Yvan. Glad you found my ‘stumbled-upon’ method of selecting the Graph useful Yvan.

Regards

Santa

tell application "Mail"
tell newMessage
set p to 6.1
try
repeat with themailitem in theCCRecipients
make new to recipient at end of to recipients with properties {address:themailitem}
end repeat
end try
try
make new attachment with properties {file name:PosixLogoPath as POSIX file} at before first paragraph
on error errmsg number errnum
tell application "System Events" to display dialog "eMailIt setting Logo error " & errmsg & " number " & errnum
end try
set c to count of paragraphs
if PosixjpgFilePath ≠ "" and ((my displayHourlyJobsFlag) or ("Hourly" is in my itemDetails)) then
try
make new attachment with properties {file name:PosixjpgFilePath as POSIX file} at before paragraph (c - 4)
on error errmsg number errnum
tell application "System Events" to display dialog "eMailIt setting jpg Chart error " & errmsg & " number " & errnum
end try
end if
set p to 18
if PosixFilePath ≠ "" and (my displayHourlyJobsFlag) then
try
make new attachment with properties {file name:PosixFilePath as POSIX file} at after last paragraph
on error errmsg number errnum
tell application "System Events" to display dialog "eMailIt setting compressed File error " & errmsg & " number " & errnum
end try
set p to 19
end if
end tell
end tell

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: 'Make new attachment' dilemma
      • From: Yvan KOENIG <email@hidden>
    • Re: 'Make new attachment' dilemma
      • From: Yvan KOENIG <email@hidden>
References: 
 >Re: 'Make new attachment' dilemma (From: Brian Christmas <email@hidden>)
 >Fwd: 'Make new attachment' dilemma (From: Brian Christmas <email@hidden>)
 >Re: 'Make new attachment' dilemma (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: 'Make new attachment' dilemma
  • Next by Date: Re: Applescript counting mails keeps counting mail in other folders
  • Previous by thread: Re: 'Make new attachment' dilemma
  • Next by thread: Re: 'Make new attachment' dilemma
  • Index(es):
    • Date
    • Thread