AppleScript

Latest

  • AppleScript brings iPod syncing to Yojimbo

    by 
    David Chartier
    David Chartier
    01.22.2007

    On the Yojimbo mailing list, Steve Kalkwarf has shared an AppleScript he built that can send Yojimbo items tagged 'ipod' to the notes section of (surprise!) an iPod. Steve gave his permission to redistribute the script so we're hosting it here at TUAW to help keep the load off his servers. It's actually a pretty smart little script: it can break up long Yojimbo items into sequential notes, and it offers a dialog to wipe out previous Yojimbo notes from the iPod in case things get messy.Grateful users on the list have already asked if there's any way to make this script run automatically once an iPod is mounted. While there is surely some fancy schmancy command one can enter into Terminal to do this (anyone care to share?), I'm sure utilities like Life2Go, an app that syncs all sorts of info to an iPod and can run anything you want when one is connected, can do the trick for those of us who aren't wearing the badge of the code ninja.

  • Twitter and Quicksilver, two great tastes

    by 
    Scott McNulty
    Scott McNulty
    01.19.2007

    I'll be the first to admit that Twitter, which we at TUAW totally heart, isn't for everyone. Quicksilver, another TUAW fav, is also not for everyone. However, when you cross Twitter with Quicksilver and throw in a dash of Growl and you've just made it onto my Christmas card list.First Coda Hale whipped up a QuickSilver action, using AppleScript, enables you to post tweets (that's what messages posted to Twitter are called) using only QuickSilver. Then Ted Leung took the same script, but added Growl notification which lets you know when the tweet has been posted via Growl.I may be in geek nirvana.

  • Import del.icio.us bookmarks into Yojimbo via AppleScripts

    by 
    David Chartier
    David Chartier
    01.07.2007

    Kenneth Kirksey has posted two AppleScripts on the Yojimbo mailing list for importing your del.icio.us bookmarks into Yojimbo, complete with all your tags. You can get these scripts from the mailing list archives of course, but Kenneth gave me permission to host both of them here on TUAW to make things easier on you readers.The first script, titled All del.icio.us to Yojimbo, imports all your del.icio.us bookmarks into Yojimbo, bringing along all of your tags to boot (If you're a messy tagger, I highly recommend tidying up your del.icio.us tags before you run this script). Per Kenneth's instructions, you simply need to download the text file we've zipped for you, copy all the code from the file into a Script Editor window, and then edit the "set delAccount" and "set delPassword" lines to add your account details in quotes.The second script, called Last del.icio.us to Yojimbo, simply imports your most recent del.icio.us bookmark into Yojimbo. Same instructions apply. Since these scripts make use of Yojimbo 1.3's new tag feature, I'm pretty sure these won't play well with previous versions. Feel free to share your experiences with the scripts here, and be sure to hit up the Yojimbo mailing list if you need more help with them.

  • Sleep Your Mac by email

    by 
    Erica Sadun
    Erica Sadun
    01.02.2007

    MurphyMac posted a cool little trick to configure your Mac to watch for custom email subject lines and then run Automator actions on their receipt. In his example, Murphy shows how to tell his Mac to go to sleep (using Apple's Automator sleeper action) when he sends mail with "sleeper" in the subject. The secret lies in a combination of AppleScripty goodness and Mail rules. He also posts a "how to reboot a PC by eMail" hint for those of you who are, in the words of 30 Rock, wearing bicurious shoes, at least operating system-wise.

  • AppleScripts for integrating Safari, NetNewsWire, del.icio.us and Yojimbo - oh my!

    by 
    David Chartier
    David Chartier
    12.29.2006

    I don't know how I missed this post at Hawk Wings a few weeks ago, but I am glad I found it at least sooner or later: Tim Gaden has been keeping a watchful eye on the Yojimbo mailing list, and he caught a set of scripts written by Dylan Damian that can take a link from either Safari or NetNewsWire, bookmark it on del.icio.us with Pukka (which I highly recommend as a paid user) and then archive the link in Yojimbo using the same tags you used on del.icio.us. I completely agree with Tim: after testing these scripts out with NetNewsWire, they work like a charm and have just been added to my toolbelt.You can score the scripts by checking the Yojimbo mailing list archives (they're online here if you aren't subscribed), or simply by heading over to Tim's post at Hawk Wings, as he is hosting the files himself.

  • PreFab UI Browser 2.0

    by 
    Scott McNulty
    Scott McNulty
    12.21.2006

    PreFab Software has just released UI Browser 2.0, their application that makes working with Apple's GUI Scripting and Accessibility technologies a breeze. The biggest additions in this version include the fact that it is a Universal app and that it requires OS X 10.4 (or later). A screen reader is also included, along with a number of other enhancements.A 30 day trial is available, and a full license costs $55 (this upgrade is free if you purchased UI Browser during 2006, and $10 if you bought it before 2006).

  • OpenMenu X: Take Control of the Right-Click

    by 
    Mat Lu
    Mat Lu
    12.14.2006

    As promised here's the first mini-review of a favorite utility: OpenMenu X: I've been looking for OpenMenuX practically as long as I've been using OS X. I love contextual menus; right-clicking (or control-clicking for purists) to access an appropriate menu just seems so right to me. Since switching to an Intel Mac, however, many of my favorite contextual menu item programs no longer work (above all QuickImage CM, not updated since 2004). But even beyond these (mostly Finder) plugins, I've always wanted to be able to customize my contextual menus in all programs with the things that I want.With OpenMenuX this is now possible. It installs as a Preference Pane, and once installed it allows you to define a custom contextual menu that will appear any time you right click in practically any application.

  • Keep Gmail and Address Book in sync with ABGMerge

    by 
    David Chartier
    David Chartier
    12.02.2006

    It's so beautiful, I think I'm gettin' all misty eyed: the venerable Mr. Tim Gaden at Hawk Wings found an AppleScript by Benjamin Harley that can pseudo-sync - as in: not just export - your contacts between Address Book and Gmail. I use 'pseudo' because there is still a little manual work involved, and it isn't a true sync process through and through, but it's the best solution I've personally seen yet.A few words of wisdom, however, before you go all download and sync happy: the script has some catches and boundaries, so I highly urge you to read through the very thorough ReadMe file (link) Benjamin provides on how the script works, and how to prepare everything needed. Also, I can't stress this enough: back up your Address Book and, oh yea - back up your Address Book before tinkering with this script. There are definitely quirks involved when dealing with some of Google's services like this, so you *need* to be aware of how this works and the best way to proceed.With the PSA out of the way, check out ABGMerge if you've been looking for a way to sync your contacts with Gmail's, and be sure to drop Ben a donation for his hard work.

  • Lilt - wave your notebook like you just... want to turn up iTunes

    by 
    David Chartier
    David Chartier
    11.13.2006

    If you're finished with smacking your MacBook to make it do your bidding, maybe you can move on to tilting it and playing with the some mood lighting (in the Pro models) to really get things done? Lilt is a new app that harnesses the power of of Apple's Sudden Motion Sensor (found in PowerBooks, MBs and MBPs) and the ambient light sensor (PowerBooks and MBPs only) to allow you to trigger the launch of applications, files and scripts. With AppleScript support, the possibilities are of course almost limitless, but the basic examples the developer Jonathan Nathan uses include waving your hand over the ambient light sensor to change tracks in iTunes, as well as tilting the machine back to hear the time spoken to you. Naturally, Lilt includes plenty of built-in actions like locking the screen, speaking text, controlling the volume and launching apps, just to help you hit the ground running.Until November 30th, Lilt is offered as a pre-release version, free of restrictions. After that, the price rises to a mere $5. Not bad for a whole new way to boss your notebook around, and with Lilt, the odds are far less that you might give it a black eye.

  • Automated Script Leads To Apple Repair Center Photos

    by 
    Dan Lurie
    Dan Lurie
    11.09.2006

    Information on this story is rather scarce as of the time of posting, but here's what we know. Flickr user Toby Mckeys wrote a script for his MacBook to take a picture with the built in iSight every time the computer wakes from sleep, and then upload that photo to his Flickr account. Apparently Mr. McKeys was having some issues with his machine that required it to be sent in for repair. While at the Apple authorized repair center in Tennessee, Toby's MacBook dutifully snapped and uploaded each time a technician woke the machine up. In the set description for the photos the machine uploaded, Toby refers to the script being used for his "Waking Study" project, which I assume is a spinoff (an interesting one at that) of all those "take a picture every day for 5 years" videos that have been so popular on sites like YouTube recently.It does not seem that the script has been made available yet to the general public, but perhaps that will change with its new found fame and fortune. Update: Make your own automator script of this app here.[via Digg]

  • iTunes AppleScript to batch edit video metadata

    by 
    David Chartier
    David Chartier
    11.06.2006

    iTunes 7 ushered in some great new video metadata, but editing this information, especially when in batches, can sometimes be a pain. For example: iTunes can differentiate between "movies" and "tv shows," (just check your Sources list on the left) but trying to select 14 episodes of an Aqua Teen Hunger Force season and pressing cmd-i doesn't yield any way to make a broad-sweeping change to "tv show."If you're in the same boat as me (and I sure hope you are, or this is a useless post), a script from the venerable Doug (you know, AppleScripts for iTunes Doug?) called Set Video Kind of Selected can bring some automation to this process. In fact, as you can see, in allows you to edit not only the Video Kind, but the Show Name, Season Number and the starting episode number of the batch you've selected. This is a killer script for those of you who have some major iTunes video library cleanup work to do.As usual, this script is provided free, but Doug solicits donations for all the rocking work he does with his now over 400-strong library of iTunes AppleScript.

  • Ruby + AppleScript = RubyOSA

    by 
    David Chartier
    David Chartier
    10.26.2006

    Our friends at Download Squad have discovered a melding of two scripting worlds: AppleScript and Ruby. RubyOSA is the darling scriptenstein of these two languages, and while I don't know a lick of either, I'm willing to bet this could be a popular amongst the code ninjas in the audience. Ruby is a popular language (the 13th most popular, by their numbers), and it's the foundation of the Ruby on Rails framework which has given us such handy web 2.0 apps as Backpack, Odeo, Strongspace and many more.This is about the line, however, that I reach where I would need to start pretending I know more about any of these languages, so I'll let you check out RubyOSA for yourself to see if it gets your coding gears turning.

  • An AppleScript to enable Windows keyboards to control a Mac

    by 
    David Chartier
    David Chartier
    10.13.2006

    Someone by the name of UNIXGEEK posted an AppleScript a while ago at Mac Geekery that changes Mac OS X 10.4 Tiger's keyboard layout to play nicely with a Windows keyboard. To be specific: the Command and Option keys are switched on a Windows keyboard (as the Windows key and Alt, respectively), so this script simply changes the layout on Tiger so your non-Apple keyboard still feels like home (sorry pre-Tiger users, Apple only introduced the ability to tinker with keyboard layouts in 10.4). If you aren't a fan of Apple's stock Pro keyboard or the MacBook/Pro 'boards, this script is for you. However, the script at Mac Geekery has a few errors in it, and Engadget's Ryan Block trudged through the post's discussions to make the proper edits to the script, and posted a fixed copy for everyone's benefit (download it from us, not Ryan. We don't wanna hit him with the TUAW effect).As a side note, I think it's funny how attached people can get to one keyboard or another. I'm slowly getting used to this MacBook keyboard, though I've been a die-hard lover of the PowerBook/MacBook Pro's tight and low-travel keys since I've owned one for the last 4 years. Ultimately though, I dislike most keyboards because I used to own an ergonomic - y'know the funny looking split ones? - and that was absolutely killer for both teaching myself better typing habits and making sure I don't get carpal tunnel. The only ergonomic keyboards I can find in stores (since you gotta get your hands on those to really get a feel for 'em) these days are Microsoft's and, while I love their Intellimouse Explorers, their ergonomic keyboards' construction just doesn't feel up to par, and there's far too much needless travel in their keys.But I digress (a lot) - if you're using a non-Apple keyboard on a Mac, enjoy this script for easily swapping the keyboard layout for your Mac computing pleasure.

  • kGTD author enthusiastic about OmniFocus

    by 
    David Chartier
    David Chartier
    09.27.2006

    Ethan J. A. Schoonover, author of kGTD, has exhaled enthusiastically on his blog about the Omni Group's recently announced teased OmniFocus. Apparently, the Omni ninjas actually brought Schoonover out to their Seattle headquarters (along with Merlin Mann of the ever-productive 43folders) earlier this year for some good ol' fashioned brainstormin' and idea wranglin', and from the sounds of things, he's pretty excited about what's in store. Ethan had nothing but good things to say about his experience and the Omni folk, and explains that this natural and evolutionary collaboration with the Omni Group couldn't have happened at a better time, as his next logical step was to turn kGTD into a full-blown Cocoa app anyway (as opposed to the series of bolt-on, awkwardly installed AppleScripts it is now).Ethan refrained from offering any salvation from the dark, torturous and detail-less dungeon the Omni Group has already enslaved us in, but check out his Hold breath. Exhale. Focus blog post for some more bits and pieces about his experience, and some inspiring (though still incredibly vague) details of what's in store for OmniFocus.

  • Mail to iPod AppleScript

    by 
    Dan Lurie
    Dan Lurie
    09.14.2006

    Every now and then, I'll get an email with a lot of handy info that I'd like to have access to without having to take out my PowerBook. I usually save the message as a PDF and sync it with my phone, but this can be cumbersome and slow. Lucky for me, Ryo has created a handy AppleScript named MailPod just for these situations. When the script is first run, it creates a new mailbox within Mail.app named MailPod. Any emails you drag into the MailPod box will be synced to your iPod the next time you run the script. If you're looking for a bit more features and control over your Mail to iPod syncing, check out MailToPod or iPDA.[via Hawk Wings]

  • Safari AppleScript to enable Private Browsing, mount temporary download disk image

    by 
    David Chartier
    David Chartier
    08.08.2006

    Now that we know how to enable the AppleScript menubar item, it's time to give Safari some AppleScript-enabled privacy features.For all those times when you need to enable Private Browsing and 'private downloading' in Safari, a macosxhints reader has posted an AppleScript with setup instructions that can enable Private Browsing and mount a disk image and temporarily changing Safari's download folder to said disk image for the ultimate in browsing privacy (macosxhints uses 'online banking' as a usage scenario; I guess that works).The script requires a little bit of setup and customization however, so check out the post for instructions. When you're finished you'll have a simple, handy AppleScript that prompts you to enable or disable Private Browsing in Safari, and then it will mount your encrypted (password-prompted) disk image for safe, secure and private downloading as well. Enjoy.

  • TUAW Tip: enable the AppleScript menu

    by 
    David Chartier
    David Chartier
    08.08.2006

    As I was working on an AppleScript-related post this morning, I couldn't seem to find any TUAW Tips in our vast archives that explained how to enable that AppleScript menubar item (pictured) that is mentioned so often in Mac software circles. This, of course, called for just such a tip.So: the AppleScript menubar item. It's a very handy tool for accessing all those AppleScripts you hear about that automate this or toggle that. As long as you save those scripts in ~/Library/Scripts (where ~ is your Home folder), they'll appear in this AppleScript menu - once you've enabled it. I personally think this menu item should be included in the default set of every Mac, but I'd wager that Apple sees this as a little too nerdy of a feature to drop on brand new users. Fair enough.To enable this menu (nerd) in Tiger, go to /Applications/Applescript and open the AppleScript Utility. It offers a few options for handling AppleScripts, including turning on this menu and the order in which the menu displays scripts from both the default system level /Library/Scripts (in your main hard drive) and your personal ~/Library/Scripts folder. If you're on 10.3 (Panther), I *think* you have an /Applications/AppleScript folder, but instead of a full-blown AppleScript Utility app, it's an AppleScript called 'Install Menu' or something similar. Back on Tiger in the AppleScript Utility - you don't worry about the GUI Scripting option unless you come across a script that specifically needs it, though I don't think enabling this for simplicity's sake can harm anything either.If this process went according to plan, you should now have your very own AppleScript menubar item like I have in the screenshot here. clicking it will offer a simple menu of all the scripts you have between the two directories you chose to display. As long as you enabled your personal Home script directory, any scripts you save there should appear in this menu immediately after saving, ready to carry out your bidding.With that said, why not check out some of our past AppleScript posts, such as one of my personal favorites: an AppleScript from Fraser Speirs that opens iSync, syncs all your devices (such as a phone or PDA), then quits iSync. If you use an application launcher such as Quicksilver, you can tie handy scripts like these to Triggers (system-wide keyboard shortcuts) for even more convenience.

  • Instant replay in QuickTime

    by 
    Scott McNulty
    Scott McNulty
    08.08.2006

    Have you ever been listening to something (or watching something) in QuickTime and wish that you had an Instant Replay button that would jog the player back 8 seconds? Perhaps there was an awesome action scene, or someone mumbled something and you just wanted to see it again.Michael Mccracken did, and so he wrote a simple AppleScript which does the job (and you can even make it go back further than 8 seconds if you like). He went ahead and assigned the script to a Quicksilver trigger and now he can go back 8 seconds in a blink of an eye.

  • Pukka 1.3

    by 
    Dan Lurie
    Dan Lurie
    07.31.2006

    Everyone's favorite social bookmarking site, del.icio.us, is great and all, but is lacking when it comes to quickly bookmarking sites as you browse. That's where Pukka comes in. Instead of being taken to a page on the del.ico.us site, as one would if using the default bookmarklet, Pukka pops up a sleek little interface on top of the page you want to bookmark, just as if you were bookmarking within your browser. Just enter a few tags, a description, and viola! Recently updated to version 1.3, Pukka now supports private posting, so you can bookmark all those "questionable" sites without fear that your friends and family will see them and disown you. Release 1.3 also introduces full AppleScript support. Pukka is available as a Universal Binary download from Code Sorcery Workshop.[via Hawk Wings]

  • AppleScript to view next unread message in Mail

    by 
    David Chartier
    David Chartier
    07.21.2006

    If you've ever wished for the ability to go to the next unread message in Mail, instead of having to shuffle through all the unread ones, some enterprising AppleScript.net forum members have put together a script that might go well with your favorite app/script launcher, such as FastScripts.I tried this out with my preferred everything-launcher, Quicksilver, and it worked like a charm. I saved the script in Script Editor, then simply added it as a Trigger in Quicksilver with a keyboard shortcut. This has the fortunate side effect of being accessible from anywhere in the OS, so when I press my hotkey, Mail comes to the front and moves to the next unread message in the selected mailbox. Here's hoping Apple's Mail engineering team is listening and has something a little more integrated cooked up for Leopard's Mail.[via Hawk Wings]