AppleScript

Latest

  • Leopard Spotlight: Control another Mac with iChat and AppleScript

    by 
    Mat Lu
    Mat Lu
    11.02.2007

    Rob Griffiths over at Macworld points to an interesting new feature in Leopard's iChat: the ability to run AppleScripts in response to events. If you look in the Alerts tab of iChat's preferences there's a checkbox for running an AppleScript when a user selectable event (e.g. a text invitation) occurs. As you can see above, Apple includes three default scripts that allow for automatically accepting or declining an invitation, and better yet, controlling iTunes. How might this be useful? One obvious way is controlling a music server in a different room just by sending IMs. "You can... send the iTunes-owning Mac these commands as chat messages from another Mac: status, next, previous, mute, unmute, help, play, and pause." A nifty little addition to iChat, I think, and since you can add your own AppleScripts, it opens up the possibility of doing something similar for a variety of other applications as well. (Incidentally, these built-in scripts live at /Library/Scripts/iChat.)

  • Secure Your Mac: Untrusted networks and how to deal with them

    by 
    Mike Schramm
    Mike Schramm
    09.28.2007

    To tell the unvarnished truth, I have to admit that I'm pretty lax on security for my computers. I don't do anything crazy like open email attachments from people I don't know, and I always double check the address bar of websites before I punch my password in. Even so, on a scale of 1 to 10, I'd say I put about an effort of 5 into keeping my computers secured. There's a lot more I could do.And so I found Albert Lee's short guide on surfing on untrusted networks very helpful. I've got a web server set up that runs my own website, but I never had any idea how to get all my network traffic running through there. Albert's guide makes that super easy-- this Lifehacker piece explains the basics of surfing with a proxy, and Albert's guide tells you exactly how to do everything on your Mac, and even how to automate the whole process using Applescript. Eventually, you can have it set up so that one double-click will get your proxy connected and get you surfing securely.The one thing you know about untrusted networks is just that: they shouldn't be trusted. When it's this easy to get your web traffic locked down, there's no reason not to.Thanks, Albert!

  • MailTags 2.1.1 available now

    by 
    Mike Schramm
    Mike Schramm
    09.19.2007

    Scott Morrison sends word that MailTags, the Mail plugin that lets you both tag your emails and connect them directly up to iCal, has hit 2.1.1. The 2.1 release came a few days ago, and introduced incoming reply tagging-- whenever you sent out a message with tags on it, the reply that came back automatically received the same tags-- and the 2.1.1 update improves that feature. You can now tag an outgoing message as "expect reply," and MailTags can notify you through Growl and with highlighting that the reply has arrived.The release also includes an example AppleScript that lets you use a "killed" tag to mark a message and any incoming replies to it as read-- if a thread has ceased to be important to you, you can ignore it completely. Bugfixes involving iCal interaction have also been implemented, and a column sizing interface improvement has been added.The 2.1.1 update is a maintenance update and available for free to MailTags users over at the website. If you haven't bought the plugin yet, you can get it here for $29.95.

  • iMovie '08 Library Compressor

    by 
    Scott McNulty
    Scott McNulty
    08.28.2007

    iMovie '08 certainly has sparked debate in Mac circles. Is it a step forward or a step back? Only time, and personal preference, will tell. There is one thing that no one can debate: saving disk space (I am sure someone can argue that since disk is so cheap, why bother but they are the vocal minority). This AppleScript application from iNik converts all those DV clips in your iMovie library into beautiful, efficient H.264 clips (giving you the choice of several different compression levels) which translates to lots of freed up space on your hard drive (your mileage may vary). The application is free but you need to have Quicktime Pro and Apple's Developer Tool installed on your Mac to make it work.

  • Sending QuickTime movies with Entourage

    by 
    Michael Rose
    Michael Rose
    08.23.2007

    They say that necessity is the mother of invention, but personally I'd nominate frustration instead. Lots of the time, the things you need to do, or think you need to do (get more exercise, pay your taxes) get pushed off or procrastinated into irrelevancy, but the things that frustrate you -- even if they're below the radar -- will drive you to the point of saying "I'm going to fix this @!#*& problem no matter what it takes!" Inventions motivated by frustration tend to be quick hacks that provide at least a momentary sense of achievement, if nothing more.If I wasn't deeply frustrated with the QuickTime Pro feature that lets you quickly email a movie, but only if you use Mail.app as your email client, I wouldn't have spent the time and energy to whomp up this Applescript. Entourage users can throw it into the Entourage script menu, or stash it in a quick-run location or under a hotkey if you want. All it does is export the frontmost movie from QuickTime Player (standard or Pro), then it encloses the exported file in a new Entourage email. Nothing too fancy, minimal error checking, and it will not respect odd/widescreen aspect ratios... but it does seem to work. If you are recording quick video clips with your iSight and emailing them off, or doing mini-screencasts, this may be something that finds a home on your machine. Download it here.Please note that the script is placed in the public domain, in readable form, and is provided with NO WARRANTY WHATSOEVER. Use at your own risk. Any ill consequences to you, your computer, your videos, your sanity or your interactions with friends & family who are now bombarded with your video snippets are your own problem and in no way the responsibility of me, TUAW, Weblogs, Inc. or AOL. In case of a water landing, your seat cushion serves as a flotation device. Exits are under the lighted signs. Do not meddle in the affairs of wizards, for it makes them soggy and hard to light.

  • GTD with VoodooPad

    by 
    Mike Schramm
    Mike Schramm
    08.23.2007

    Chris at Trichech.us has written up a short guide (and included a useful little AppleScript) on how to run GTD in VoodooPad, the get-it-down quick application that we love so much here at TUAW.Basically it revolves around a series of tags-- if you have a task that needs to be done in a certain context (such as home or office, or even as specific as "at the computer" or as general as "thinking"), you just tag it with @ and then whatever the tag is. When the script is run, it grabs all of the tagged lines, and combines them all on one page, so you have an at-a-glance look at what needs to be done where. And you can even date items, and see them placed on the "Actions" page as well.The big problem with me and any GTD plan is just that I tend to be so picky-- if a system doesn't work exactly the way I want it to, I tend to get lazy and start ditching it for good old pen and paper again (which causes me to fall back into the same old gaps). But Chris' system looks solid enough to use without a lot of configuration, and yet adaptable enough that I can shape it to my own mind. If you've got VoodooPad (and if you don't, why not) and you're on the hunt for a GTD system, give it a try.[ via Gus Mueller ]

  • Open man pages from Xcode

    by 
    Mike Schramm
    Mike Schramm
    07.30.2007

    Toxic Software's posted a useful little script if you spend any amount of time in Xcode-- because manopen is having trouble with Leopard, John punched up a shell/Applescript to open man pages directly from within Xcode's command line. It's tiny (and doesn't really do much-- just opens an Xcode Help menu item), but it seems useful-- straight from the command line, you can break out the man page within a GUI, and just keep right on coding.Because the script uses UI scripting, you've got to enable an option in Universal Access preferences, but then just toss the script in your PATH and you're good to go. I can't imagine it's hugely relevant for everyone out there (I haven't put anything together from the command line in Xcode in a while), but anyone building stuff there will probably appreciate it.And if viewing pretty man pages from the command line is your thing, Atomicbird Software came up with a script that breaks out man pages in PDF form. If you love working from the command line but love reading man pages in something a little easier to browse, today's your lucky day.

  • An AppleScript for selecting the iChat menubar item

    by 
    David Chartier
    David Chartier
    07.11.2007

    I understand if this might sound kinda weird, but hear me out: As an iChat user, I love the flexibility of its UI and the clever menubar item that displays all available contacts. Since I've found myself flying without displaying the buddy list more and more often lately, I've been wishing for a way to select iChat's menubar item with a simple keyboard shortcut, giving me quick access for viewing who's online no matter what app I may be using at the moment. Thinking out loud this morning, I even posted this wish on Twitter - only to find Daniel Jalkut of Red Sweater Software (makers of MarsEdit, FastScripts and more) coming to my rescue moments later! Demonstrating the wonders of AppleScript, Daniel quickly whipped up a script that does exactly what I want. To make the script painlessly easy to use, it can be tied to a shortcut with his excellent FastScripts or a Quicksilver trigger, providing instant access that selects and displays the iChat menubar item and all available buddies. Easy breezy iChatting, without needing to keep my buddy list always visible.If you want the script, head over to Daniel's Twitter post that contains the tinyURL download link. Toss the script you download into your ~/Library/Scripts folder (or anywhere else you like to store them), and then point your favorite keyboard shortcut utility at it to make your iChat life a bit easier. Thanks Daniel!

  • MacTech VBA to AppleScript Guide free online

    by 
    Mat Lu
    Mat Lu
    05.03.2007

    We've mentioned before Microsoft's controversial decision to end support for Visual Basic (VBA) scripting in the forthcoming Office 2008 and replace it with AppleScript. While normally moving to an Apple standard technology over a closed Microsoft solution is a good thing, this move will have major repercussions with respect to cross-platform compatibility. Once this is done many scripts and macros written for the Windows versions of MS Office will no longer work on the Mac version. There is a work-around, rewriting the macros and scripts in AppleScript, though that will take some doing. Fortunately, MacTech magazine has produced a VBA to Applescript Transition Guide to help with the process. Originally the Guide was only included with the April issue of MacTech Magazine, but they have now seen the light and are offering it free on their website. You can still purchase a PDF or paper copy as well. Check it out over at MacTech.[via The Apple Blog]

  • Refresh the Finder

    by 
    Mat Lu
    Mat Lu
    04.16.2007

    Before Tiger one of the things people complained about the Finder was its lack of a "Refresh" command along the lines of F5 in the Windows Explorer. Supposedly this was fixed in Tiger with automatic refresh, but as we've noted in one of our Ask TUAW columns, sometimes it doesn't quite seem to work. Having had enough of this, Samuel Svensson decided to do something about it and wanted to add a refresh button to the Finder similar to the one in Safari. He wrote this simple application, which is actually just a wrapper around a simple AppleScript: tell application "Finder" tell front window update every item with necessity end tellend tellThe nifty part is that it is just a regular application you place in your Applications folder. It merely has a very small icon so that when you drag it onto your Finder toolbar (as we just covered in Mac 101), it looks like a Finder button. In fact, it isn't a hack or plug-in of any sort. Cool idea.Refresh the Finder is a free download from design firm Söderhavet.Thanks, Fredrik!

  • PackRat 1.1 adds AppleScript and Automator support

    by 
    David Chartier
    David Chartier
    04.11.2007

    Someone must have answered Rod Schmidt's call for AppleScripters, as he has just released PackRat 1.1, a major update to his offline Backpack syncing app that brings double-whammy support for both AppleScript and Automator. You can now get almost all your Backpack data via script, which means power users can do all sorts of extra-cool nerdy things now. A 'Synchronize with Backpack' Automator action is also included, offering easy access for the rest of us to set up auto-downloads in the morning or before we leave for a trip (hint: run the action as an app attached to an iCal event).Check out Rod's announcement post for more details and to download a copy of the new PackRat version. As usual, PackRat will function as a non-expiring demo that allows working with 4 pages, while a license costs $24.95.

  • QuickPack: Quicksilver plus Backpack

    by 
    Mat Lu
    Mat Lu
    04.06.2007

    Author Nils Werkmeister (great name!) writes in to tell us about his QuickPack, a Quicksilver Action that makes it very easy to add entries to a page on 37Signals' Backpack online organizational tool. We've mentioned a number of Backpack tools in the past, including various widgets and Packrat, but Nils' solution has the nearly insuperable advantage of integrating so well with TUAW's favorite utility: Quicksilver. After entering text mode in Quicksilver (generally with a period) you're able quickly to insert calendar entries, ToDos, notes, and reminders to any of your Backpack pages by prefixing your entry with one of the various supported tags (e.g. "+todo" and "+note"; see the QuickPack page for full details). Once you select the QuickPack action it will bring up another dialog box asking on which page you want your new entry placed.

  • Tumblr now has Dashboard widgets, Quicksilver add-on

    by 
    David Chartier
    David Chartier
    03.31.2007

    Tumblr is a unique new tumblelog service that employs a KISS philosophy: offering a very streamlined, one-column layout and a clever bookmarklet that is smart about what you're trying to share on your Tumblr blog. While the minimalist templates can be edited by hand to include just about anything you want, Tumblr's concept is to be a sort of blogging scrapbook; a place to toss all those unique things you find across the web that might not fit at any of your other blogging venues, or that you simply don't have much to say about. Take a look at the Tumblr Radar to get an idea of how others are using the service. Now that introductions are out of the way, a recent update to Tumblr, as well as a how-to post from our sister Download Squad blog, has highlighted some Mac OS X-specific features that should make it even easier for Mac users to jump into the service. First, Alex Hung (Windows developer for ecto, by the way) wrote up a great how-to at Download Squad that explores the construction of a Tumblr Dashboard widget with Apple's Dashcode. A DLS reader was even inspired enough to go through with it, creating theTumblr Widget that is hosted on Google Code. This widget also became one of two that Tumblr just highlighted in a recent blog post, with the other being more of a basic test widget that Tumblr cooked up themselves. The second Mac Tumblr tool is an AppleScript for Quicksilver by Andrew Lilja. Andrew provides the AppleScript code and instructions for some unique syntax you can use to specify things like titles, quotes and links for your Tumblr posts, all from Quicksilver's handy UI.It's great to see these kinds of tools appear for Tumblr, as it makes an already simple service even easier to use.

  • Last post EVER about creating new files from Finder

    by 
    Michael Rose
    Michael Rose
    03.28.2007

    OK, OK! We clearly have a wide range of opinions on this whole "How can I get my Mac to right-click-create new files, like Windows does?" thing. Some folks like the QuickSilver approach, some think QuickSilver is an anti-Mac-way abomination. Some like NuFile, and some like FinderPop (Update: and some, like Wired's writer, and me too now that I've tried it, like DocumentPalette.)Some think the whole idea is plain goofy and there's nothing wrong with going into an application to create a file; others think the previous people are missing the point, because sometimes you need an starter file right here right now, and this is faster than opening the parent program and navigating to the folder you want, or using a stationery file or template.As usual, if you want something stripped to the essentials that works really gracefully and cleanly, call John Gruber. In response to yesterday's NuFile post, John knocked off a quick AppleScript which, in combination with the Big Cat Scripts plugin and the text editor of your choice, creates a nice little text file wherever you right-click.We're through talking about this now; does that work for everyone? Good. Enjoy your Wednesday!

  • PackRat dev calls for AppleScripters

    by 
    David Chartier
    David Chartier
    03.25.2007

    Rod Schmidt, developer of PackRat, has issued a call for AppleScripters who are interested in automating his rocking Backpack client. PackRat, to my knowledge, doesn't have AppleScript support yet, but that does seem to be at the top of the request list and would mark another powerful feature PackRat has over Backpack's own web UI: OS integration. I would love to be able to, for example, right-click some selected text in a Cocoa app and click "Send to PackRat," which would then sync up to Backpack all without me ever having to touch an actual webpage. If you have some AppleScripting skills and are interesting in making PackRat even cooler, be sure to drop Rod a line by heading over to his announcement post or contacting him from his company's site, infiniteNIL.

  • Clipboard Killer

    by 
    Dan Lurie
    Dan Lurie
    03.02.2007

    We've all been there– intending to paste a link to that hot new social network but instead exposing your social security number. Indeed, the clipboard can be a fickle and unforgiving mistress. After an unfortunate incident last night (which he won't elaborate on), my buddy Emory decided to pull out of the dangerous game of clipboard copy/paste. He whipped up a neat little AppleScript by the name of Clipboard Killer which will wipe the contents of your clipboard every 25 seconds and replaces it with ...For those readers new to AppleScript, it's easy to turn this into a background application that you can set to launch on login. Simply open Script Editor (found in your Applications folder), copy and paste the code, and save the script as an application.

  • Skip the AppleScript with Ruby

    by 
    Mat Lu
    Mat Lu
    03.01.2007

    For a long time now I have been working on learning AppleScript, where "working on" means I bought an AppleScript book that sits on my table accusingly, but I've never actually picked it up and read through it. AppleScript is clearly a powerful and relatively easy way to get somewhat complex tasks accomplished on your Mac; heck with AppleScript Studio you can even write stand-alone applications of a sort. This story on MacDevCenter, however, has given me pause. AppleScript guru Matt Neuburg (who literally wrote, if not the, at least a book on AppleScript) has put up a nice tutorial on replacing AppleScript with rb-appscript, which is "a high-level, user-friendly Apple event bridge that allows you to control scriptable Mac OS X applications using ordinary Ruby scripts." Now everybody and his brother has been going on of late about how wonderful Ruby is for web development, particularly with Rails using TextMate, so now I have a dilemma. Should I actually try to learn Ruby instead and double my return, as it were? While I think that over, go check out Matt's tutorial and see for yourself how Ruby and Apple events can make beautiful music together.[Via MacVolPlace]

  • Script to archive Mail.app messages by month

    by 
    David Chartier
    David Chartier
    02.05.2007

    For pro-email users and organization aficionados, Mail.app's archiving abilities leave just a tad to be desired. There are of course a few 3rd party options for archiving and/or exporting messages from Mail.app, and Tim Gaden's excellent Plug-ins and add-ons list at Hawk Wings is a great resource to track down a solution that works for you. Fortunately, in his never-ending quest to find all things Mail.app, Tim found yet another solution in the form of an AppleScript called MailArchiveByDate written by Doug Hellmann. As its name suggests, this script will archive selected messages into a mailbox structure based on year and month the message was sent. You'll get a structure like so: 2006 01 02 etc. Doug also includes instructions for setting up this script to work with Mail Act-On, the excellent plugin from Scott Morrison (developer of MailTags) that allows you to execute rules via keyboard shortcuts. Altogether, this is one powerful (and relatively cheap, considering Mail Act-On is donationware) system for archiving Mail.app messages while at the same time keeping them accessible right inside of Mail.

  • iTunify: iTunes Toolbox

    by 
    Mat Lu
    Mat Lu
    02.01.2007

    iTunify is a stand alone tool for doing a variety of things to your tracks in iTunes, like changing ID3 tags, removing artwork, etc. Somewhat strangely, Mistatree seems to be marketing iTunify in terms of the number of Doug's AppleScripts that it can replace, though it's not entirely clear that iTunify can do anything that cannot be done with an iTunes script. Nonetheless, if you prefer a free-standing program to a plethora of scripts, then iTunify may be useful.iTunify is $15 and a demo is available.

  • TUAW Video: A Mac Moment with Adam Goldstein

    by 
    Dan Pourhadi
    Dan Pourhadi
    01.22.2007

    We're on a roll: In this edition of TUAW's Mac Moment series, I sit down with Adam Goldstein, the young author of AppleScript the Missing Manual. "But Dan," you ask, puzzled, "what's so special about this particular author?" Just watch the video to find out: he started his book, working for David Pogue, at age 15. He's also an MIT student, a writer for MacDevCenter, and a killer poker player. He even schools me in my own interview (worth a watch just for that). Click here for the direct mp4 version.