• 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: Why is this AppleScript working unreliably? Any ideas?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is this AppleScript working unreliably? Any ideas?


  • Subject: Re: Why is this AppleScript working unreliably? Any ideas?
  • From: Brian Christmas <email@hidden>
  • Date: Tue, 12 Oct 2010 17:03:24 +1100

Jeff, this actually works.

There's no need to keep trashing the old files, and this will store the three images at the root level of your boot drive. The problem might actually lie in the trashing routine.

Regards

Santa
set filetoget1 to ("http://very-bored.com/pics2/cuteanimals/cute-animals-1.JPG")
set downloadpath1 to "VALIDFILENAME1.jpg"
set filetoget2 to ("http://very-bored.com/pics2/cuteanimals/cute-animals-1.JPG")
set downloadpath2 to "VALIDFILENAME2.jpg"
set filetoget3 to ("http://very-bored.com/pics2/cuteanimals/cute-animals-1.JPG")
set downloadpath3 to "VALIDFILENAME3.jpg"
tell application "URL Access Scripting"
download filetoget1 to downloadpath1 replacing yes
download filetoget2 to downloadpath2 replacing yes
download filetoget3 to downloadpath3 replacing yes
end tell

set myAttachments to {downloadpath1, downloadpath2, downloadpath3}
set mySMTP to "00.00.00.00"
set myFrom to "email@hidden"
set myTo to {"email@hidden"}
set mySubject to "subject of email to send"
set myBody to "body text of email to send" & return & return

tell application "Mail"
activate
set newMessage to make new outgoing message with properties {address:myTo, subject:mySubject, content:myBody, return:myFrom}
tell newMessage
repeat with LogoPath in myAttachments
set LogoPath to POSIX path of LogoPath
make new attachment with properties {file name:LogoPath} at after the last paragraph
end repeat
repeat with themailitem in myTo
make new to recipient at end of to recipients with properties {address:themailitem}
end repeat
(*repeat with themailitem in ReportCCRecepients
make new cc recipient at end of cc recipients with properties {address:themailitem}
end repeat*)
send
end tell
end tell



And what, you ask, was the beginning of it all?
And it is this......
Existence that multiplied itself
For sheer delight of being
And plunged with numberless trillions of forms
So that it might
find
itself
innumerably

Sri Aurobindo





 _______________________________________________
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

References: 
 >Re: Why is this AppleScript working unreliably? Any ideas? (From: Jeff Gold <email@hidden>)

  • Prev by Date: Re: Why is this AppleScript working unreliably? Any ideas?
  • Next by Date: Re: Why is this AppleScript working unreliably? Any ideas?
  • Previous by thread: Re: Why is this AppleScript working unreliably? Any ideas?
  • Next by thread: Re: Why is this AppleScript working unreliably? Any ideas?
  • Index(es):
    • Date
    • Thread