• 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: Sending an image as attachment in Mail.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sending an image as attachment in Mail.


  • Subject: Re: Sending an image as attachment in Mail.
  • From: Joe <email@hidden>
  • Date: Sun, 25 Mar 2012 12:30:57 -0700


On Mar 25, 2012, at 10:39 AM, Manuel wrote:

Hello, scripters. 

I am trying to automate sending a screen capture by Mail, but the capture does not attach to the message. 

do shell script "screencapture /Users/macdiario/Desktop/Captura.jpeg"
set CapturaAdjunta to "LionRetail:macdiario:Escritorio:Captura.jpeg"
delay 2
tell application "Mail"
set this_message to ¬
make new outgoing message with properties ¬
{subject:"Screen Capture"}
tell this_message
make new to recipient with properties ¬
{address:"email@hidden"}
end tell
activate
tell content of this_message
make new attachment with properties {file name:CapturaAdjunta}
end tell
set visible of this_message to true
send this_message
end tell



Hi Manuel,

This is untested but I think you need to use an alias for your attachment

e.g.
set CapturaAdjunta to alias "LionRetail:macdiario:Escritorio:Captura.jpeg"

Hope it helps

Joe
 _______________________________________________
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: 
 >Sending an image as attachment in Mail. (From: Manuel <email@hidden>)

  • Prev by Date: Re: How to determine if iTunes has been updated or a sync has occurred?
  • Next by Date: Re: Sending an image as attachment in Mail.
  • Previous by thread: Sending an image as attachment in Mail.
  • Next by thread: Re: Sending an image as attachment in Mail.
  • Index(es):
    • Date
    • Thread