New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Automator -> Small script


Post Reply New Thread Subscribe

 
Thread Tools
HeroBiX

 
HeroBiX's Avatar
 
Member Since: Sep 10, 2008
Location: Sweden
Posts: 114
HeroBiX is on a distinguished road

HeroBiX is offline
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! =)

What does Intel do in a Mac?
A hole lot more then in a PC
QUOTE Thanks
nabl

 
nabl's Avatar
 
Member Since: Dec 13, 2007
Location: United States of America
Posts: 256
nabl has a spectacular aura about
Mac Specs: 2.1GHz MacBook with 4GB RAM, Mac OS X 10.6, iLife and iWork 09

nabl is offline
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).
QUOTE Thanks
HeroBiX

 
HeroBiX's Avatar
 
Member Since: Sep 10, 2008
Location: Sweden
Posts: 114
HeroBiX is on a distinguished road

HeroBiX is offline
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 =)

What does Intel do in a Mac?
A hole lot more then in a PC
QUOTE Thanks

Post Reply New Thread Subscribe


« MAC OS, Admin Privileges | problem opening /dev/tty.iap »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
need help to amend a script so that it only runs if iTunes is running nick_harambee OS X - Operating System 1 07-20-2009 12:15 PM
Script for adding users i_eat_short_ppl OS X - Operating System 0 06-04-2009 07:01 PM
How to use QuickSilver to run my script yinglcs OS X - Operating System 0 02-09-2009 09:54 PM
Really Need Help Regarding MAC Script MACSCRIPT OS X - Apps and Games 2 08-13-2008 08:15 AM
apple script to greet me off stand by jakeroberts OS X - Development and Darwin 0 04-29-2007 01:34 PM

All times are GMT -4. The time now is 07:34 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?