Mac Help Forums


Reply
Thread Tools Display Modes

How to write your own Automator Actions...

 
Ric Ric is offline
Senior Member
Ric's Avatar
Join Date: May 2004
Posts: 4,260
 
      7th November 2005
As soon as I get one evening spare I shall put a little tutorial here.

It will not cover everything, but it will be a good starting point for those that want to learn...

regards

Ric

Last edited by Ric; 9th November 2005 at 05:34 PM..
 
Reply With Quote
 
 
 
 
Ric Ric is offline
Senior Member
Ric's Avatar
Join Date: May 2004
Posts: 4,260
 
      9th November 2005
Have got a spare evening tonight so, I will be starting this article later tonight...Wednesday 9th November !

regards

Ric

Last edited by Ric; 9th November 2005 at 09:35 PM..
 
Reply With Quote
 
Ric Ric is offline
Senior Member
Ric's Avatar
Join Date: May 2004
Posts: 4,260
 
      9th November 2005
Before we start...

...back up your Mac !

(For no other reason, than you should!)

Now go to Apple Developer Website and sign up...just for the basic Account it's free !!! You have to be a member to Download !!!

Now, you need to either download the latest version of Xcode (Developers Tools !) from here, latest version. or load it on to your Mac from the supplied DVD that came with it, you will more than likely have to download !

Download vers 2.1, not the pre release 2.2 !

Now get yourself a coffee, it's a 800mb download !

Last edited by Ric; 9th November 2005 at 09:35 PM..
 
Reply With Quote
 
Ric Ric is offline
Senior Member
Ric's Avatar
Join Date: May 2004
Posts: 4,260
 
      9th November 2005
Have you downloaded everything now...
 
Reply With Quote
 
Ric Ric is offline
Senior Member
Ric's Avatar
Join Date: May 2004
Posts: 4,260
 
      13th November 2005
You should have had enough time to have had a read of a few bits...

...so we shall continue tomorrow night !
 
Reply With Quote
 
Ric Ric is offline
Senior Member
Ric's Avatar
Join Date: May 2004
Posts: 4,260
 
      15th November 2005
...off we go again.

First you need an idea !

Well we are are going to use the "Make Alias" Action that I made earlier...

Now we need to open Xcode.

Then goto the File Menu and click "New Project"

Now you have some choices...





This will be an AppleScript Automator Action...

...in Xcode you can 'make' 3 types of Actions, it depends on your needs and what language you want to work in.

The three choice are...

1) AppleScript Automator Action
This project builds an Automator action using AppleScript.

2) Cocoa Automator Action
This project builds an Automator action using Cocoa.

3) Shell Script Automator Action
This project builds an Automator action using shell scripting.
 
Reply With Quote
 
Ric Ric is offline
Senior Member
Ric's Avatar
Join Date: May 2004
Posts: 4,260
 
      15th November 2005
Now you need to name it, Xcode defaults to saving your 'Projects' into your home directory...


 
Reply With Quote
 
Ric Ric is offline
Senior Member
Ric's Avatar
Join Date: May 2004
Posts: 4,260
 
      15th November 2005
You should now be presented with a screen like this...





I know you're probably thinking aaaaaahhh, what's all that then !
 
Reply With Quote
 
Ric Ric is offline
Senior Member
Ric's Avatar
Join Date: May 2004
Posts: 4,260
 
      17th November 2005
Well I'm not going to tell, not yet any way, that would take a whole book !

What I am going to explain, is all the bits that we are interested in...

...first

The top bar, "Toolbar"



This can be customised to how you want, mine doesn't normally look like this, but this 'is' the default ToolBar that you should see !

There's nothing here that you need to change, until you know a bit more. But the important bits are...

On the left:

Make Alias
Active Target

This is the name of our "Target" the target is the 'bit' that we are making...in normal circumstances this would be an Application...but we are making an Action in this case !

You can have more than one Target, but this is not something you need to worry about now, it is not needed for building an Action !

Action

Like in other Apps, it allows easy access to useful menu's and shortcuts. For now you don't really need it.

'Build' & 'Build and Go'

Now we're getting some where...

These buttons do what they say...

Build...this builds your 'Project' once all the elements have been made you click on the Build button and Xcode compiles your Project into the 'Target'.

Your new Project, whether it be an Application, Action, ScreenSaver etc would now be available to test.

Sometimes when you press build...Xcode will 'not' compile the Project because it finds errors in your code etc. This is were you move on to debugging !

Because we are making an Automator Action, we will use the 'Build and Go' button.

When we press the BaG button (BaG) Xcode will compile the Action, and then open Automator and place our Action in it so that we can test...

...try it, even though, all we have done so far is open Xcode, picked a Template and given it a name...

Click the BaG button and watch...amazing !

You should see something like this !


 
Reply With Quote
 
Ric Ric is offline
Senior Member
Ric's Avatar
Join Date: May 2004
Posts: 4,260
 
      17th November 2005
You have now compiled your first Automator Action !

You can even drag it in if you want !



Aren't Apple nice ! They give you the software and then they do nearly all the work for you...

...now we need to make it do something !!!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automator Sync actions? AES Apps 2 30th July 2011 07:14 PM
Automator Sync actions? AES Mac 2 30th July 2011 07:14 PM
Catalog of Automator Actions? AES Apps 8 28th May 2011 05:43 PM
How to write your own Automator Actions.... aaabha Automator 0 28th August 2010 12:51 PM
Automator - More iPhoto Actions? roboboticus Portables 1 21st August 2005 04:46 PM


All times are GMT +1. The time now is 10:36 AM.
Mac-Help.com is an independent website and is not affiliated with Apple Inc.


Welcome!
Welcome to the Mac Help Forums
 


Latest Threads
New book about Steve Jobs << take part in it!
Arjan (58 Minutes Ago, 09:37 AM)

Help! Stupid computer is automatically logging me out
Elizaboo (11 Hours Ago, 10:41 PM)

URGENT Help. Crazy talk Mac!
Joeker (12 Hours Ago, 09:42 PM)

PDF Document
yura (22 Hours Ago, 12:13 PM)

Difficulties with internet speed (nothing to do with connection)
sammethh (1 Day Ago, 06:36 AM)

 


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51