Automator -> Small script

Joined
Sep 10, 2008
Messages
114
Reaction score
1
Points
18
Location
Sweden
Iam making a Advent calendar for my GF, sending her a picture every day until the 24 of December

So I want to do a smal automator program wich sends a picture, and I have done so it makes a new E-mail and ad the attatchment, but then I dont know how to make it send, so I have added an apple script

so, now I need help from you guys =)

How can I make it send away, example make it press "shift+cmd+D"?

if I could get help with that would be awesome! =)
 
Joined
Dec 13, 2007
Messages
256
Reaction score
10
Points
18
Location
United States of America
Your Mac's Specs
2.1GHz MacBook with 4GB RAM, Mac OS X 10.6, iLife and iWork ‘09
Do you have the Send Outgoing Messages action in Automator? You can put that right after the Add Attachments to Front Message or New Mail Message action, and it will send it for you.

Edit: If you don't have that action, try using this code in a Run Applescript action:
Code:
on run {input, parameters}
	
	tell application "Mail"
		send the front outgoing message
		set sentSuccessfully to the result
	end tell
	
	return sentSuccessfully
end run
That will send the front outgoing message (presumably the one just created by Automator) and then return a boolean indicating whether the send was successful (true if so, false otherwise).
 
OP
HeroBiX
Joined
Sep 10, 2008
Messages
114
Reaction score
1
Points
18
Location
Sweden
thanks alot =)

The program works while running in Automator, works great! put in a 2-3 sec pause after adding the picture, so it have time to get it into the mail otherwise it sends it without the attachment

But, when I make an app out of it, it starts, but nothing happens, no new mail creates, can you somehow check why it doesn't start?

I can upload the program when I get home =)
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top