AppleScript

Latest

  • Dear Aunt TUAW: Help me sort iTunes Music by Apple ID

    by 
    Erica Sadun
    Erica Sadun
    05.16.2012

    Dear Aunt TUAW, Ah, the problems of modern romance. Since I broke up with "her" (and yes, I know you were saying she wasn't right for me) getting rid of all the remants of the relationship has not been easy, especially "her" digital footprint. She loved her music. So she would bring her iPod to my house and sync it leaving a whole bunch of songs I'll NEVER play again that were purchased under her Apple ID. How can I find them, delete them and finally be ready to move on with my life? Your favorite but knucklehead nephew, Mark Dear Mark, When in doubt, there's usually an AppleScript solution to everything. Doug's Scripts offers one called "track down purchases" that scans your library, looks at the file for each song, and retrieves the apID purchase account for the track. It then builds individual playlists that sorts the songs by account. Be aware that you may encounter snags for homebrew recordings such as those from GarageBand, because the script expects to encounter standard iTunes tracks. If so, you may want to temporarily remove those while running the AppleScript. Let Auntie know if that does the job for you. Hugs, Auntie T.

  • You're the Pundit: 50 Shades of AppleScript

    by 
    Erica Sadun
    Erica Sadun
    04.30.2012

    When it comes to evaluating the next big thing, we turn to our secret weapon: the TUAW braintrust. We put the question to you and let you have your go at it. Today's topic is AppleScript. "AppleScript is a bit like Office Space's Milton Wadams. It's put upon and underappreciated, but then again probably going to be moved to the basement soon." -- Victor Agreda Ah AppleScript. What a curious artifact it is, lingering on as it does into the Mountain Lion age, long after its inception as a natural-language inspired developer automation language. First debuting in System 7, AppleScript allows apps to control one another to script repetitive tasks. Apps declare scriptable actions that they support (for example, you can tell iTunes to create playlists, to rename tracks, and so forth) and AppleScript lets you build short programs to perform these actions as if a user were interacting directly. In today's Sandboxed world, where apps need to schedule playdates, carry ID cards, pass Gatekeepers, and request privileges, AppleScript is something of a living fossil. It harkens back to the Wild West days of "anyone can do anything, so long as it's between consenting apps." It seems to me that AppleScript is due to meet a natural end. It's not as if the language were a joy to use. At best, it was painful. "Nothing exemplifies self-hatred better than AppleScript!" "Beat me, whip me, make me write AppleScript" and so on. There are dozens of ways to do any task in AppleScript and nearly all of them are just a quick typo away from being wrong. It offers a very frustrating development environment. "AppleScript is one of the most interesting word puzzles ever. Nothing like trying to guess the right verbs and nouns each time" -- Richard Goodwin At the same time, it is deeply convenient -- a way to add extra functionality to your Mac and perform complex tasks with a simple entry point. I still have dozens of scripts on my Lion Mac that I use on a near daily basis -- from resizing images for TUAW posts to signing apps for iOS testing. As useful as AppleScript is, I cannot see it moving forward much further. Already, the Mac App Store has ruled out most AppleScript based submissions that control one app from another (Incidentally, this killed my QTSkipper utility, which allows you to perform 30-second TiVo-like jumps in QuickTime). So does AppleScript-based automation continue to have a future on the Mac? Lex Friedman of Macworld wrote up a pretty good summary of the situation a couple of months ago. He discusses the various ways scripts operate and how Mountain Lion will treat each scenario. But this doesn't address the bigger question: in a post-PC world, does AppleScript-style automation really deserve a place on our computers? That's much harder to answer, especially as Apple moves away from scripting, the command line, and other relics of hard core nerdism to a consumer-centric focus that places its emphasis on seamess computing. I'm not sure tomorrow's Macs will have room for that kind or level of customization, and if so, then we're looking at one of the longest lived, powerful, and most convenient aspects of the Apple world reaching a natural end. For all that AppleScript drives me crazy, I would greatly miss it if it were to have to go away. Is AppleScript at its end? You tell us. Place your vote in this poll and then join in the comments with all your analysis. %Poll-74952%

  • Siri talks to Mac 512k, plays telephone with intermediary computers

    by 
    Sean Buckley
    Sean Buckley
    11.08.2011

    Possibly fueled by the same geeky instinct that pushes our kind to build SD card readers for ancient game consoles and port Doom to just about everything, YouTube user Napabar recently bridged the 27 year gap between the Macintosh 512k and the iPhone 4S. That's right, Siri and the Fat Mac are talking. Sort of. Most of the heavy lifting is being done by a pair of intermediary machines, an iMac that's been configured to run an AppleScript upon receipt of a Siri dictated email, and a bridge computer that passes on the resulting text file to the Mac 512K's floppy drive. Result? Dictate an email to Siri, get a text file with its contents on the Mac 512k. Old and new technology, talking like old pen-pals. And to think, all it took was two middlemen.

  • Thought experiment: hacking Siri to control your TV

    by 
    Erica Sadun
    Erica Sadun
    10.28.2011

    Yesterday, our lead editor Mike Rose sidelined me to ask, "Could we tell Siri to control Apple TV?" Just as a thought experiment. After a bit of investigation, I had an answer for him, which was "Yes, you could, but no, you probably don't want to." That's because the degree of hacking necessary to make this happen, versus the actual real-world performance, really isn't worth the effort. It might make a cool demo, but not an effective remote control. The best and most obvious approach would have been to have Siri use URL schemes to trigger a local application on the iPhone, which would then coordinate with a Mac client or directly with Apple TV over Bonjour. Unfortunately, Siri does not allow you to open web pages -- yet. She's quite apologetic about this, but my hope for a URL-based solution was a no-go. Moving on, I investigated an AppleScript/email-based approach. Cory Bohon wrote up a series of tutorials a while back on TUAW demonstrating how to use mail rules to trigger scripts. You create rules (Preferences > Rules) that match message subjects and contents, and use the "Run AppleScript" choice to choose a script to trigger based on your rules. This was a much more promising avenue, but Mike and I agreed that the complexity of sending emails via Siri felt more complicated in practice than using SMS texting. I started investigating ways of triggering email rules by SMS. Fortunately, a simple solution quickly popped up: Google Voice. GV offers the option of forwarding text messages and provides the bonus feature of tagging subject lines with the incoming phone number. This makes it especially easy to authenticate and match incoming requests to Mail rules. In order to create the control scripts, I would use AirFlick rather than iTunes. I shall spare you the messy details, but I would extend the app to support external pause and play requests. Finally, you have to set up a contact on your iPhone using the Google Voice address. No big deal. Just make sure you use a name that Siri can easily recognize. The operational path then works like this: "Siri, text AirFlick 'pause'." You wait for Siri to compose the SMS message. You then send it. The iPhone texts Google Voice. Google Voice forwards the message to your inbox. The mail rule triggers and runs the AppleScript, which causes AirFlick to send a pause command. The whole latency from your spoken command to your Apple TV actually pausing? Probably under a minute. As I said, this is a not an optimal approach, but if I wanted to invest a couple of hours I could get it up and working today. So how close are we now to extending Siri control to our world and to third-party apps? Well, Siri can already pour you a beer and trigger any SMS-based Arduino set-up. But beyond using it for simple triggers, we're still pretty far away from fine-tuned control. Apple really needs to release a developer API that will provide third-party rules and vocabulary for Siri to follow before we can truly jump into "build your own remote with Siri" scenarios. Of course, by the time that happens the company may simply release a Siri-savvy TV of its own.

  • TUAW's Daily Mac App: Shuttie

    by 
    Samuel Gibbs
    Samuel Gibbs
    05.11.2011

    Ever wanted to leave your Mac running unattended at night, but don't want it running all night long? Today's Daily Mac App will help you do just that. Shuttie allows you to bind one of six actions to a countdown timer, allowing you to shutdown, restart, sleep or logout of your Mac, or fire off an AppleScript or an alert. You select the action you want, the countdown time and hit the activate button. Shuttie will provide periodic Growl notifications as it counts down to zero, as well as a timer on its dock icon, and then it will initiate whichever activity you've got selected. Loading an AppleScript is a drag-and-drop affair while your desired alert text is entered into a text box. Sure, there are other ways of doing this kind of thing, but Shuttie is a good way to set up these tasks to be performed remotely. It's US$1.99 in the Mac App Store.

  • Ask TUAW: AppleScripting coolness

    by 
    Justin Esgar
    Justin Esgar
    04.27.2011

    It's Tuesday Wednesday, which means it's time for Ask TUAW Video Edition. We've gotten great comments and questions coming in, and we have been trying to get to them all. Some of them are just too hard to show in a video format such as Ask TUAW, so today I have decided to do a little AppleScript "tutorial." Here are 4 scripts that I use: iTunes - this script will automatically play/pause my music I'm back - will automatically make Adium go available, and start my music Mail Announce - will announce who incoming mail is from (works with mail.app only) Tell me a joke - tells a random joke You can download the scripts here. Updated the download link at 5:30pm EST As always leave us comments below or email us here.

  • Ask TUAW Video Edition: PDF and Scripting

    by 
    Justin Esgar
    Justin Esgar
    03.29.2011

    Andrew asked us about how to have a folder convert documents to PDF format so that he can sync them to his Dropbox. Today's show goes into how to use Automator and AppleScript to do some scripting, and we're going to demonstrate an iPad app that will convert documents for you on your iPad. Some resources for you: Automator - Mac OS X Automation Automator AppleScript - Mac OS X Automation AppleScript Save2PDF - Main Company Page Any questions, please leave them in the comments or email us! Read on for the video.

  • Use AppleScript to open current Safari URL in Google Chrome

    by 
    TJ Luoma
    TJ Luoma
    03.14.2011

    I've been using John Gruber's suggestions from Going Flash-Free on Mac OS X, and How to Cheat When You Need It to avoid installing Adobe Flash by using Google Chrome (which includes its own version of Flash) whenever I run into a page that has Flash I want to see. To make this easier, John suggested turning on the "Develop menu" in Safari's "Advanced" preferences, which includes a sub-menu to "Open Page With" and a sub-sub-menu that shows all of your installed browsers. John suggested using System Preferences to create a keyboard shortcut for "Google Chrome" or "Google Chrome.app" depending on which one you saw in the menu. Unfortunately, this failed for me quite often. Every time I launched Safari, the keyboard shortcut would not work until I had opened that menu manually using the mouse. I hate using the mouse. After opening the menu, the keyboard shortcut would work until I quit Safari again. That was mildly annoying, but things recently took a turn for the worse. Here's what the menu looks like for me now: Notice that the browser listings now include version numbers. This means that a keyboard shortcut would have to include the version number, which means it would break whenever the browser is updated. I asked a few folks, and it appears this changed in Safari 5.0.4. I haven't been able to find a way to revert to the old behavior, so I started looking for another way. Enter AppleScript Using AppleScript, you can send the current URL from Safari to Google Chrome. Here is the AppleScript that I am currently using: (Note: this article was updated on 2013–02–10 to include an updated and improved version of the AppleScript, as well as expanded instructions on how to use it.) This AppleScript will launch Google Chrome if it is not already running, and will not overwrite any existing tabs in Google Chrome. To use this AppleScript, you will need to download it from Github. Note that the download filename will be something ridiculously long which starts with 'gist4750810' (don't ask me why, it's a Github 'thing'). Find that file in your Downloads folder, double-click it, and Archive Utility will open it and show you a folder with a file named 'Open in Google Chrome.scpt' in it. Now you'll want to open a new Finder window so you can navigate to where that file needs to be installed, so choose File » New Finder Window and then move on to the next section. Installation To use 'Open in Google Chrome.scpt' in Safari, it needs to be installed to ~/Library/Scripts/Applications/Safari/ (where ~ is the path to your Home directory). If that folder does not exist, you will need to create it. The easiest way to do this is to go to the Finder and then choose the "Go to Folder..." option from the Go menu, as shown here: Once you have done that, a window will appear prompting you to enter the path that you want to go to. Enter ~/Library/Scripts/Applications/Safari/ and see if it opens the folder. (Aside: If it says "The folder can't be found" try going to ~/Library/Scripts/Applications/ instead, and then just create the 'Safari' folder using File » New Folder from the menu bar.) Once you are in the ~/Library/Scripts/Applications/Safari/ folder, simply drag the 'Open in Google Chrome.scpt' file to it from the other Finder window. Using 'Open in Google Chrome.scpt' From Safari Once 'Open in Google Chrome' is installed, there are two ways to use it from Safari. Option one is to use the "Scripts" menu extra from OS X. Option two is to use a program called FastScripts. I prefer FastScripts, but will explain how to use the standard OS X option first. To use that Scripts menu, launch the "AppleScript Editor.app" found in /Applications/Utilities/ and then go to Preferences and enable the option 'Show Script menu in menu bar' as shown here: Once the Script menu is enabled, you will see 'Open in Google Chrome' whenever you are in Safari. Just click on the Scripts icon in the menu bar and select it as shown here: But what if you want to use a keyboard shortcut instead of the mouse? For that you will need FastScripts, which gives you everything the standard 'Scripts' menu offers, plus the ability to assign keyboard shortcuts. To assign a keyboard shortcut, open FastScript's preferences and find the entry for 'Safari' under your home folder, then locate the 'Open in Google Chrome' entry. Click over in the 'Shortcut' column and assign it a keyboard shortcut. As you can see here, I have chosen ⌥ (Option) + G: FastScripts lets you assign up to 10 keyboard shortcuts for AppleScripts for free. If you want to use more than 10, you'll need to buy a license for US$15. As a keyboard-lovin' mouse-hater, I consider that a bargain. FastScripts offers a lot more than just keyboard shortcuts, so I would encourage you to check it out. "Flash Free" Now whenever I am in Safari and encounter a page which requires Flash, I press ⌥ + G and the page loads in Google Chrome. It's quick and easy, and doesn't require that I maintain a separate Flash installation. Adobe Flash continues to be a source of security problems. Using it in only Google Chrome is a good way to increase your browsing security, especially since Chrome is frequently updated. p.s. since I know there are many other Keyboard Maestro fans out there, I'll also add a quick link to my Keyboard Maestro macro for doing this same thing using Keyboard Maestro.

  • Sparrow gets AppleScript support, immediately put to use with OmniFocus

    by 
    Steve Sande
    Steve Sande
    02.15.2011

    Sparrow, the sleek new email client for Mac OS X, was updated yesterday to improve speed, fix some minor bugs and add some limited AppleScript support. While the changes might not be apparent to many Sparrow users, they were apparently an inspiration to Don Southard, who immediately figured out a way to use the AppleScript support with OmniFocus. Southard's quick work allows him to delegate an OmniFocus task by sending an email with details about the task to another person via Sparrow. The script is saved and placed into the ~/Library/Scripts/Applications/OmniFocus folder, and then a script icon named "Send to Sparrow" is placed on the OmniFocus toolbar at a place of your choosing. To delegate a task, you select a task, then click the icon to send it to Sparrow. The task's name, context and note fields are included in the email, with Delegated Task as the subject line. As Southard notes, you can easily rearrange the order of the task fields within the script. It's a simple but effective AppleScript, and demonstrates the power of Apple's venerable scripting language in integration of different apps. As Sparrow evolves from the current 1.0.1 version, it would be nice to see additional AppleScript support built in so that people like Don Southard can do even more fun and useful things with the app. [via MacStories, image from Tech Blog /via Dirt Don]

  • Mobiola WebCamera gets localization, AppleScript support

    by 
    Steve Sande
    Steve Sande
    12.03.2010

    It's always nice when developers respond to the suggestions of reviewers. A few weeks ago, I wrote a review of Mobiola Web Cam from SHAPE Services. It's a combination of an iPhone app and a desktop (Windows and Mac) client that turns your iPhone into a webcam. At one point in my review, I suggested that it would be nice to see scripting support built into the Mac desktop client for automating the process of capturing screen shots or video from the camera. Just over two weeks later, the app has a slightly different name (WebCamera instead of Web Cam), it's localized in German, Italian, Spanish, French, and Dutch, and AppleScript support has been added. The app is currently on sale for US$1.99 from the usual $4.99 price, so if you're thinking about picking it up, now's a good time. A quick look at the Mobiola WebCamera Scripting Suite from AppleScript showed three new verbs: take snapshot, start recording, and stop recording. With these, and a connected property that's part of the application class, it's quite simple to write an AppleScript that waits for the iPhone to connect to the desktop app, and then takes a picture or timed video at regular intervals. I found that I also no longer needed to specify an IP address and port for the client and app to get the camera to connect, so it's obvious that the developers at SHAPE Services are paying attention to reviewers and customers to make a good app even better.

  • Fake.app makes powerful Web automation easy

    by 
    Brett Terpstra
    Brett Terpstra
    09.06.2010

    Todd Ditchendorf (Celestial Teapot Software) is probably best known for creating Fluid, a Site-Specific Browser app that we love to talk about. While Fluid was a great and well-executed idea, Todd's latest app, Fake, is truly inspired. The easiest way to describe Fake is to say it's Automator for the Web. It may not have the mass appeal that Fluid does, but its target audience (Web designers and developers, as well as Web power users) will have no trouble appreciating its capabilities. Fake, like Automator, offers an Actions library and allows you to create drag-and-drop workflows with Web-specific capabilities. Fill a form, click a button, follow links ... basically, you can automate anything that deals with HTML and DOM elements. You can even inject CSS and JavaScript into pages, which opens doors to extensive security testing, among other things. Sound intriguing? Read on ...

  • Create keyboard shortcuts to jump to Safari 4 tabs directly

    by 
    TJ Luoma
    TJ Luoma
    05.13.2010

    My friend Steve (no, not that Steve) just solved a problem I've had for awhile now: how to jump to a specific tab in Safari using the keyboard. Turns out that it's possible, and it's free, and it works pretty well. What else could you ask for? The solution comes from Paul Kretek's website where he outlines how to use FastScripts to assign keyboard shortcuts to specific tabs. Paul and Steve both want to use Safari, but they like Firefox's method of numbering tabs 1-9 used together with the command (⌘) key . By default, Safari uses ⌘+[1-9] to jump to bookmarks on your bookmark bar, which I use all of the time so I'm planning to make keyboard shortcuts for tabs control+1-9 instead. (⌘+0 [zero] is used to set the zoom back to original size.) Who knows, I might change my mind. I had found myself trying to use ⌘+[1-9] for tab switching in Safari because I was already used to tab switching that way in iTerm. The only bookmark keyboard short I use with any frequency is ⌘+1 which I use to invoke Quix which I've written about previously and absolutely cannot work without. Paul's instructions are very thorough, and although they may look a little complicated, it's something you only need to setup once. Also note that FastScripts is free for up to 10 shortcuts, after that it's US$14.95 for unlimited use.

  • Former Apple Store employee creates Iron Man's J.A.R.V.I.S. using a Mac mini

    by 
    Michael Grothaus
    Michael Grothaus
    04.06.2010

    Okay, there's no HUD display like Tony Stark had and it isn't voiced by Paul Bettany, but former Apple Store employee Chad Barraford has created Project Jarvis, a digital assistant that greets him, Tweets for him, and can even tell his family when he has a headache and dim the lights of his apartment before he reaches home. Project Jarvis is based on the comic book character Edwin Jarvis, Tony Stark's human butler who became an AI construct after he was reinvisioned for a twenty-first century audience in the first Iron Man film. Chad's real life Jarvis may not help him fly an invisible suit of armor, but via RFID tags, webcams, and microphones, Barraford can communicate with Jarvis in a number of ways including tweeting, instant messaging, and speech recognition which allows him to control lights and appliances, notify him of breaking news, Facebook updates, Netflix queues, check stock quotes and weather, and even help assist him with cooking. Barraford calls Jarvis a digital life assistant (DLA) and runs it entirely from a four year-old Mac mini running custom AppleScript, he told us. Right now he has no plans to sell the AppleScript code, but is always happy to share ideas with other developers of DLAs. Click on over to The Boston Globe to see video of Jarvis in action.

  • SDK devsugar: Re-signing applications

    by 
    Erica Sadun
    Erica Sadun
    02.09.2010

    TUAW's devsugar series helps introduce developers to tools and tricks that they might not yet be familiar with. Today's tip centers on signing already-compiled and already-signed applications with a new custom signature. A while back, I posted about a way to sign already-compiled applications with your personal credentials in order to better allow developer-to-developer distribution. By re-signing an application, it allows you to install it on any of the devices you have registered to your account at Apple without having to go through the fuss and bother of normal ad-hoc distribution. In addition, it makes it easier to develop applications on a contractor's machines, to ship them to a client, and then have them signed and shipped to App Store using the client's identity. A basic command-line solution is as follows. It calls codesign (found in /usr/bin) to sign the application, using the default keychain item that matches "iPhone Developer". It's a handy script, especially for informal beta distributions. #! /bin/bash export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate codesign -f -s "iPhone Developer" $1 There are, however, several problems with this approach. First, it assumes you only want to sign with development (typically "Debug build") credentials. That's not going to work if you need to re-sign for distribution. (Solution? Change iPhone Developer to iPhone Distribution). Second, it assumes you only have one developer or distribution profile in your keychain. (Solution? Change iPhone Developer, for example, to iPhone Developer: Company Name to exactly match just one keychain entry.) Third, it assumes the person doing the re-signing knows how to use a command line. For that, the solution is a little more complicated. Recently, this topic came up on a developer e-mail list that I moderate: how do you make it easier for a non-technical client to re-sign an application, normally for distribution. As a solution, I put forth the proposal that one could embed the above shell script behavior into an AppleScript droplet. After consulting with a few colleagues, and gathering their requirements, I decided to give the project a try. I built an AppleScript application that signs any application dropped onto it. You can find a working copy of the application at my website. App Signer iterates through any apps dropped onto it, checks to ensure whether each file (or bundle, really) ends with an ".app" extension, and then attempts to sign those files using /usr/bin/codesign. Users can choose to sign with Developer credentials, Distribution credentials, or select Other to open a prompt and enter text for keychain disambiguation. (See the screen shot at the top of this post for an example of the disambiguation dialog.) The application displays results for each application, one at a time. Please note the following caveats: I make no attempt to guarantee that the app dropped onto this utility is actually an iPhone app (rather than, say a Macintosh application). When working with on-device keychains, the identity used to sign the application has to match the application id set forth in the Info.plist file for the application, otherwise keychain access will fail. This is a free application. It is offered under the BSD license. Use it at your own risk. Credit always appreciated. The open source github repository for App Signer can be found here. To create the application, open the AppleScript source in Script Editor and choose File > Save As > File Format: Application.

  • Send tweets automatically during a Keynote presentation with Keynote Tweet

    by 
    Sang Tang
    Sang Tang
    01.21.2010

    Imagine if, as Steve Jobs moves through each slide of his Keynote presentation, he also has the telepathic powers to automatically tweet information related to the slide. But even the almighty Steve Jobs can't do that. Fortunately for him, there's Keynote Tweet. An open source AppleScript app, Keynote Tweet will automatically tweet the text from your presenter notes (accessible by clicking on "view" and selecting "show presenter notes"). Keynote Tweet was exposed to me while reading a piece by IDEO Labs' Gentry Underwood, who highlights the idea of large presentations increasingly occurring within the context of a backchannel in which audience members are responding to what's being presented. Getting Keynote Tweet up and running is fairly straightforward. Simply download the app, and then add the following entry into the Keychain Access app: Keychain Item Name: http://twitter.com Account Name: Your email address Password: Your Twitter password Now, with the Keynote Tweet app running, any text between the [twitter] and [/twitter] tags will automatically tweet when that slide is displayed (while in slideshow mode). For example, "Jay Leno lacks the charm, wit and red headedness of Conan O' Brien" will be tweeted the moment I reach the slide showing the percentage of people that hate Jay Leno. Keynote Tweet is available as a free download here. [via IDEO Labs]

  • Ask TUAW: Automatic file sorting, Disk Utility, iPod battery replacement, and more

    by 
    Mat Lu
    Mat Lu
    01.20.2010

    Welcome back to Ask TUAW, our weekly troubleshooting Q&A column. This week we've got questions about automatically sorting downloaded files, using Disk Utility to change partitions and format external drives, using a KVM in a multi-platform environment, replacing an iPod touch battery, and more. As always, your suggestions and questions are welcome. Leave your questions for next week in the comments section at the end of this post. When asking a question, please include which machine you're using and what version of Mac OS X is installed on it (we'll assume you're running Snow Leopard on an Intel Mac if you don't specify), or if it's an iPhone-related question, which iPhone version and OS version you have.

  • Sal Soghoian talks Automator use in education

    by 
    Dave Caolo
    Dave Caolo
    11.13.2009

    Total Apps has published a nice guest post from Sal Soghoian, Apple's Production Manager for Automator, intended for teachers. He describes how educators have a limited amount of instruction time with the kids, and even less for maintenance tasks like making sure the proper software is installed, that students are on the proper web page, and so on. Sal wants to help, and points out a number of links useful to anyone (not just teachers) who wants to automate these repetitive and often time-consuming tasks. Best of all, he shares a link to The Teacher's Helpers (scroll down a bit), which is a free collection of Automator actions specifically written to assist teachers with Macs in their classrooms. If you've been put off by AppleScript, give Automator a try. Its drag-and-drop interface is much easier to use.

  • Batch move your playlists to an iTunes folder

    by 
    Sang Tang
    Sang Tang
    10.22.2009

    Folders, which have been a feature of iTunes since iTunes 5.0, serve as a means to better organize your music. For example, you could create genre- or artist-based folders with corresponding playlists nested within them. But moving playlists into folders isn't the most fun thing, and can be especially time consuming if you're going to be moving a bunch. Fortunately, the "Move Playlists to Folder" script provides a means for you to easily move multiple playlists over to a specified folder in iTunes. First, download and install the script: the file should reside in your [username]/Library/iTunes/Scripts/ folder. After successful installation, the script will now appear as an item in the scripts menu. If you didn't already have any scripts installed, the script menu allows you to access and run scripts for a specific app. This AppleScript, along with a host of many other iTunes script goodies, is available as a free download at Doug's Scripts. However, Doug would also be more than happy if you were generous enough to donate a buck or two to help buy him a latte.

  • Snow Leopard Services in practice: Amazon S3 uploader

    by 
    Brett Terpstra
    Brett Terpstra
    09.06.2009

    I stumbled upon a great example of the Snow Leopard Services that I've been drooling over. The S3 Upload Service by August Lilleaas is available as a workflow which can be opened in Automator, so you can examine its inner workings. It uses AppleScript and Ruby, easily passed back and forth thanks to Automator's building-block-style workflow. It lets you upload a publicly-accessible file to an S3 bucket, and copies the URL into your clipboard upon successful upload. The workflow requires that you at least have RubyGems installed, and have an Amazon S3 account set up, but it will handle the rest. It asks for your S3 credentials with an AppleScript popup, which has the unfortunate side effect of not being able to be forced to the front very easily and tends to get lost behind other windows. There are workarounds to that, but no way to keep it on top once it's up. It looks possible to build custom nibs for your services, so I might play around with making a general-purpose utility panel popup to fill the void in my own projects. In the process of rolling my own Services in Snow Leopard, I've definitely found some limitations, but I'm having fun working around them. This one is a great example of passing results -- returned from different languages -- and processing them, all within Automator. It's not super-polished -- your mileage may vary -- but a big thanks to August for putting it out there for the rest of us to play with!

  • Use iCal to tweet automatically

    by 
    Aron Trimble
    Aron Trimble
    07.17.2009

    Recently, the question came up of how to automatically "tweet" a birthday message to a friend or loved one on their special day. After thinking on this question for some time I finally came to a solution. As it turns out, intrepid TUAW blogger Dave Caolo wrote a Mac 101 article all about attaching AppleScripts to iCal events. Additionally, Brad Linder over at Download Squad put together a nice little tutorial for posting to Twitter via the command line. It wasn't obvious at first, but these two articles together formed a dynamic duo of birthday tweeting proportions. If, dear reader, you are interested in setting up a system for sending out some birthday tweets then follow along as we travel the mysterious world of iCal events and command line tweeting. Read on for a somewhat technical tutorial on how to set up some pre-scheduled tweeting goodness. (If you're looking for a service to take care of all this for you, here you go.)