Keeping with the "self-built apps," I'm going to show you how to build your own YouTube downloader. Sure you could use applications like TubeSock, but where's the fun in that? This application will download the YouTube flash video from a pasted link, and all with a little AppleScript.
Continue reading to learn how to build the YouTube downloader.
Scott posted yesterday on a new series about SSH coming to Apple Matters. If you want to skip the learning and go straight to the Secure Shell-ing, then why not take a look at this recent post by John Welch. In this post, he describes how to set up a simple AppleScript that uses Apple Remote Desktop to SSH into a set of Macs on your local network. The script takes the machines you have selected in ARD (or, if you've only got one selected, just that machine) then opens SSH sessions in Terminal, ready for you to type your UNIX commands to your networked computers.
If you want to get the script and start batch-connecting to your machines, visit his website.
If you work like I do, then you have a hierarchy of folders contained in a single folder that allows you to manage project files, notes, etc. Well, when it comes time to chunk those old files, normally you have to manually go through and remove them; this task can become daunting if you have multiple project folders. I am going to show you an easier way. In this how-to, we'll cover how to create an AppleScript that will allow you to remove folders that are older than 30 days.
Continue reading to learn how to create this AppleScript.
If you use iCal to store you important dates and events, and use it on a regular basis without syncing events via an iPod, iPhone, or other device, then you know how frustrating it can be when you forget about an appointment or event. I'm going to show you a way to automatically print your daily iCal agenda with a simple AppleScript. You can set this script to run when your Mac starts up so you never miss an appointment!
Continue reading to learn how to create this AppleScript.
Have you ever been away from your Mac, then come back only to find that your co-worker has stolen your favorite Apple pen? Well, I am going to show you how to catch them in the act by creating a Mac "spy cam." For this how-to, you will need to create an Automator workflow, AppleScript, and some Mail rules. So, cue the James Bond music, and let's begin.
You do need an iSight or a newer Mac with a built-in camera. (Yes, I know there are sometoolsprebuilt to do this -- but what's the fun in that?)
Continue reading to learn how to create the Mac spy cam.
We talk about iCal once in a while. Did you know that an iCal alarm can launch an AppleScript? A recent comment from reader Zach (and subsequent replies) made us think that this tip might be of use to anyone who hasn't considered the possibilities.
When you schedule an alarm in iCal, one of the options for the alarm is "Run script." If you select "Other..." from the script selection dropdown, you can choose any AppleScript you want to launch. Then you just tell the alarm when to go off and your script will run.
Considering that AppleScript can control quite a few of the applications on your mac, and that iCal can handle repeating events, the possibilities are wide open. You could do something as simple as schedule applications by putting the following into a script in Script Editor and saving it as a regular script:
tell application "Safari" to activate
and another one...
tell application "Safari" to quit
to quit. Of course, you could then add to the scripts to have Safari navigate to certain pages as well. And you could launch as many apps as you want in the same script. Anything you can do with AppleScript, you can schedule. For more Terminal-savvy readers, Applescript's "do shell script" command allows for an even wider range of possibilities. You can even get user interaction with a "display dialog" command. I'm sure there's someone here who could have a blast with this.
If you use any applications with Cocoa-based text editors (TextEdit, Mail.app, and many more), you may have noticed that some of them, like Mail.app, recognize URLs and automatically turn them into links. The links are in Rich Text Format (RTF) and can be copied and pasted into other RTF-compatible text fields. To the best of my knowledge, though, there's no easy way to automate the creation of an RTF hyperlink, via AppleScript or other means. In programs that don't detect URLs, or if you want to link text to a URL, you generally have to select text, go to a menu item (Link..., Link Add..., etc.) that's a few submenus down, and then enter the url. Me? I'm always looking for the easy way out...
Last week I talked about controlling your Mac with an e-mail; this week, as promised, I am going to show you how to apply this same idea to iTunes. So, without further ado, let's get started with writing some AppleScripts.
Have you ever been away from your Mac and wanted to shut down, restart, or needed to open an application remotely, but didn't have access to anything except your iPhone? Well, I am going to show you how to do these tasks with AppleScript and Mail.
This process is fairly easy and involves creating a simple AppleScript and some Mail rules. Note that since these rules will cause your Mac to perform the listed action when they run, be careful when testing!
Continue reading to learn how to build this AppleScript.
iCal is great for storing your calendars and appointments, but what if you want to export (or backup) your calendars in case of a data emergency? Well, you could backup your calendars manually; however, AppleScript is so much cooler. Let's automate the backup of iCal calendars through the use of an AppleScript.
As someone who spent months hand-crafting Visual Basic scripts in Microsoft Office, only to have Microsoft pull the rug out from under me with the release of Office 2008 (they abandoned VB support for the Mac. Grrr.), I'm very grateful to MacTech magazine and longtime AppleScript guru Paul Berkowitz.
MacTech has re-released Paul's 150-page guide for making the transition from VBA to AppleScript (originally printed in the April 2007 issue of the magazine, and also available in modified form on the Microsoft Mac BU site). It's highly detailed, with step-by-step instructions. It looks like I know what I'll be reading next week (and if I run into trouble I can always bug Cory for help).
You can download the guide as a PDF for $9.95US, or get the PDF plus a hardcover version for $19.95US. Both options include a free subscription to MacTech magazine, which is a great bonus for anyone who likes to dig into the underside of Mac OS X. If your wallet is a bit light, you can read the entire thing online for free.
Many people have criticized Apple for not updating their AppleScript language documentation regularly (myself included). Scoff no more, because Apple updated their documentation yesterday. The last update to the AppleScript language documentation was on May 5, 1999 -- almost 9 years ago.
For anyone who thought that Apple was abandoning AppleScript for other ways of automation (such as Automator), fear not. This shows that Apple is still committed to bringing custom automation/scripting to Mac OS X and the 21st Century.
If you're like me, when you sit down at your Mac, you end up opening a few specific apps depending on what kind of project you're working on. I am going to show you how you can group these applications into "task launchers" that will bring up a suite of programs with one click. For instance, I have a script that will open iPhoto, iDVD, and iMovie called "Create Movies." When I run this script, it will open all of the applications I need to make my movie. I also have one called "Productivity" that will, when opened, launch Mail, iChat, Pages, and Yojimbo (even though some might argue with iChat's productivity value).
Want to make your own launchers? Continue reading for the instructions.
Just as there are multiple ways to save Automator workflows, there are also multiple ways to save AppleScripts. In this how-to, I will show you ways in which you can save your AppleScripts for future use.
Daniel Jalkut put together a little app called "Usable Keychain Scripting" a little while ago that was designed (what else?) to make scripting the Keychain a little more usable -- the interface included in OS X is bad, to say the least. He was apparently hoping that it would be better in Leopard, but no dice -- we're all using the new version, and it's still a pain to access the Keychain with AppleScript.
So he's updated UKS to version 1.0b3. It's still a free download (and I'm guessing he still hasn't added the ability to set values of Keychain items, but only because he was justifiably worried that doing something wrong would have terrible consequences). If you've already been using it, you should be happy to see a new version, and if you haven't tried it yet, but do a lot of Keychain scripting, hopefully it'll make the interface a little less painful.