AppleScript Tutorial

Includes system stuff, productivity, emulation, design, and games for pre-OS X Macs!

AppleScript Tutorial

Postby nathanpc » 26 Sep 2009, 11:54

Hello,
I'm new in Mac and i want to know where i can find a good tutorial to learn AppleScript, but remember that i'm using Mac OS System 7.5.5.

Thanks,
Nathan Paulino Campos
User avatar
nathanpc
 
Joined: 26 Sep 2009, 02:05
Location: Brazil

Re: AppleScript Tutorial

Postby joshc » 26 Sep 2009, 20:54

Quite a few good books were written about AppleScript, take a look on Amazon to pickup a few used copies.
MacBook Pro 15.4" Non-Retina (Mid 2012) with Antiglare Display, Intel Core i7 2.3 GHz, 16GB RAM, WD Scorpio Black 750GB 7200RPM, OS X 10.8/Windows 7 dual boot.
User avatar
joshc
 
Joined: 04 May 2007, 19:37
Location: UK

Re: AppleScript Tutorial

Postby porter » 26 Sep 2009, 21:20

1. Start up the script editor.

2. Turn recording on.

3. Switch to Finder

4. Move a couple of files around

5. Switch back to editor

6. Stop recording

7. Save script as a file

8. End of tutorial

You should see lots of "tell type name" to do something with things. That's basically AppleScript, it's about sending AppleEvents which are defined in the target applications dictionaries. Oh, and a few variables and flow control. Where it gets fancy is when people integrate with MacHTTP and start writing web-sites in AppleScript, look for those samples around.
User avatar
porter
 
Joined: 19 Dec 2007, 00:20
Location: New Zealand

Re: AppleScript Tutorial

Postby beachycove » 28 Sep 2009, 14:39

This would get you somewhere.
User avatar
beachycove
 
Joined: 02 May 2007, 20:33
Location: Ontario

Re: AppleScript Tutorial

Postby Charlieman » 29 Sep 2009, 17:32

Lots of references to Mac OS X, but dig around on some of the links provided from this great site:
http://www.latenightsw.com/scripting.html

The MacScript mailing list was a great resource in the 1990s so it is worth searching for archives on Google.
Charlieman
 
Joined: 03 May 2007, 11:19
Location: Leicester, UK

Re: AppleScript Tutorial

Postby tyrannis » 01 Oct 2009, 01:31

The Tao of AppleScript is a well-written introduction.
User avatar
tyrannis
Banned
 
Joined: 31 May 2008, 00:45

Re: AppleScript Tutorial

Postby register » 15 Nov 2009, 15:44

tyrannis wrote:The Tao of AppleScript is a well-written introduction.

Yes, this is a very well written documentation. I used the book as a guide to write and understand my first lines of AppleScript code. If, in any case, AppleSrcipt is not capable of performing some tasks you would like to include into your project, and you did not want to deal with something less easy to learn, try to combine it with the Classic Software KeyQuencer. It allows to write similar script programmes with a set of inbuilt functions, and also to execute AppleScript code from within a KeyQuencer macro script. Have fun!
register
 
Joined: 04 Feb 2008, 23:30


Return to Software

Who is online

Users browsing this forum: No registered users and 1 guest