Good and Geeky

David Allen Wizardgold

David Allen Wizardgold

How to Be Good and Geeky One Step at a Time

AppleScript commands Mac automation

Table of Contents

Good and geeky

Applescript editor

Delve into the AppleScript editor and issue some AppleScript commands

As you may already be aware I do like to have my Mac working for me automatically if at all possible. I would much rather spend the time working how to set up an automation than repetitively doing tasks that could be done with a simple click of a button. To that end I have already some good tools on my Mac that I like to use.

I have Hazel which automatically looks after files and folders for me. If I drop picture files or movie files onto the desktop Hazel will open up application for my re-numbers them and move them to another folder. I certainly would not like to have to do that manually on my file by file basis. Also I think that having a clean desktop on your computer is a sign of a clean and perfectly sane mind.

Keyboard Maestro

As part of the writing that I do I often have to do repetitive tasks. One example of this would believe that I have to take a link from Safari and put it into the markdown text of one of my documents. I have managed to get my hands on a Keyboard Maestro macro which does this for my whenever I type in a short keyboard shortcut command. I also have a number of other regularly used automation’s that Keyboard Maestro does for me. Another example of this would be the automatic openings of Dragon Dictate and the application Marked, ready for me to begin writing and all it takes is for a simple press on the F3 key.

Using AppleScript commands or going simple with Automator

I have on many occasions had a look at the application called Automator which has been part of OS X for some time now. It keeps getting better, but I still think that not many people actually use it. I know I prefer to use Hazel for some tasks rather than using Automator. Hazel is just much easier to set up and up until now has been more reliable too. I am not quite ready to give up on Automator yet though, I could be prepared to spend a little more time learning how to get the best from it. I may be more inclined to persevere with Automator if I can also get into using the AppleScript editor, as AppleScript commands and AppleScripts can be included as Automator functions.

Looking for an AppleScript tutorial to learn how to use AppleScript commands

It isn’t too difficult to find one or two tutorials so that you can learn how to use AppleScript. All you need then is the willpower and the time to do the actual learning of the very simple programming language. One of the good things about AppleScript is that the way the language of it works is quite like English. You using which words that are easy to understand in reference to the programming that you’re trying to accomplish. Obviously, this is very helpful when you want to learn AppleScript programming.

Applescript commands

Inserting AppleScript commands into the AppleScript editor or AppleScript Studio

Even though you can find many an AppleScript tutorial, you will probably find it useful to also have the AppleScript reference material that you can get from the Apple website. As is often the case with this reference material from Apple, you will find it a little dry and difficult to read. It is helpful though to have the definitive word on AppleScript commands available as you work your way through an AppleScript tutorial.

The latest version of AppleScript has become more powerful and also more complicated with AppleScript Xcode programming. You can get to AppleScript Studio within Xcode. If you do that you will be working with the big boys there and if you can get into it, you will be able to create more contemplative AppleScripts.

No AppleScript editor required – Doug’s AppleScripts

You only need to do a search on the Internet for Doug’s AppleScripts to find an AppleScript resource that will give you a pile of Dougs AppleScripts. You won’t have to learn how to do AppleScript iTunes programming as Doug has already covered it and provided all that good stuff for you. On that site you will also find other AppleScript examples.

Make your own AppleScripts with the AppleScript editor

Even if you download a number of AppleScript examples to get certain Mac automation projects completed, you can also use those examples to help you learn AppleScript. You can read through the programming and learn how to do an AppleScript comment, AppleScript droplet or an AppleScript dialogue box.

It is worth noting that not all applications you have on your Mac will be scriptable using AppleScript. So for example, if you wanted to make an Evernote AppleScript you would need to look through the AppleScript editor library, to see if Evernote was in the list of scriptable applications.

AppleScript commands other applications

Although AppleScript is quite a powerful in what it can do and can create self-contained applications, it is more for using as a way to get various Mac applications to work with each other. If you are going to create a fully fledged Mac application then you will need to dive into Objective-C within Xcode.

<img style=”display:block; margin-left:auto; margin-right:auto;” src=”http://mac20q.com/wp-content/uploads/2012/05/Mac-Applescript-editor.png” alt=”Mac Applescript editor” title=”Mac Applescript editor” ” border=”0″ width=”549″ height=”373″ />

Following an AppleScript tutorial

Below you will find a number of links to AppleScript tutorials, both those aimed towards beginners of AppleScript and also for the nerds and geeks of the Apple community. I must be a bit of a geek as I find a certain amount of satisfaction in getting an understanding of how this programming stuff works. I still have a long way to go though before I can proudly wear one of those propeller head hats. I would expect that, when that happens I may be dreaming in AppleScript commands.

Share This Post

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on pinterest
Pinterest
Share on telegram
Telegram
Share on whatsapp
WhatsApp