My taste of Applescript
26 02 2009A couple of weeks ago I took delivery of AppleScript 1-2-3 by Sal Soghoian.
This book is a over 1½”chick and it’s going to take a while to get through.
chapter 1 in the Apple site, It’s a good teaser and even after one chapter you’ll have written a script or two that are useful.
By the end of chapter one I had myself a nice little script for opening two Finder windows on my Desktop, one opens at my Downloads folder and the other at my Dropbox folder.
I spend a lot of time transferring files between these two folders so after writing the script I created a small icon in Pixelmator and added it to my script, I’ve now got the script saved as an application and have the icon in at the top of my Finder window for easy access..
My idea when I first got this book was to play along as I read on my Mac but I found that it just isn’t working for me.
I’ve decided to read through the book first, mostly on an evening and once I’ve read from front to back and got a good understanding of what’s going on I will play along on my Mac as I’m sure was the intention.
I will post a review of the book once I’ve come to the end of it and let you all know what I think.
So far it’s one of those books that you always want to get to the next chapter of because you just want to know what Sal will have you scripting next.
AppleScript is a powerful tool if you learn its full potential and this has to be the best book out there to do just that.






I also bought this book and plan to read through it in the next few days.
But so far, from studying the index and the table of contents, I completely miss a section/chapter about reading and writing from and to files (open for access…). Or am I just blind?
Best regards from Germany!
P.S.: Sal soghoian is my role model
Hi Martin,
I think the way to approach this book is to go from the first page to the last.
When I got it I tried going straight to the section I was most interested in, I then realized that I didn’t have a clue…
Up to chapter 9 now and have noticed there is a lot of referring back to past chapters.
I’m not sure what you mean by writing from files or open to access, but feel free to contact me again if I can help in any other way..
Thanx
Hi Wayne,
It seems that you are a quick reader making good progress
I just stumbled about the fact that the book does not seem to mention how to read from and write to text files:
set txtparas to paragraphs of (read (filepath as alias))
And I think that this is quite an important subject when it comes to programming and automation
Have fun scripting!
Martin
Hi Martin,
I will be contact you if I come across it.
I have read a chapter recently that opens text files for you, names them and allows you to enter data.
As I say, I’m just reading through it for now then I’m going to go back through it again.
Hi Martin.
I’m not 100% sure if this is what you were referring to but I have found this:
http://www.apple.com/applescript/sbrt/sbrt-09.html
It refers to writing to files with Applescript. It is taken from the website but it’s also included in the book, I just haven’t got to that part yet.
Hope it helps,