Try your hand at the Spore Creature Creator and win free stuff from Big Download!
Posts with tag script

Mac Automation: saving Automator workflows

Now that you've been introduced to Automator, let's let's get into the "nitty-gritty." In the previous Automator post, we learned how to make a workflow that would take photos from your camera, import them into iPhoto, then allow you to e-mail them. Let's look at the three ways in which you can save this workflow for later reference.


Workflow File
You can save the workflow as an actual Automator workflow file by clicking File > Save; choose "workflow" from the format drop-down menu. By saving as an Automator workflow all of your actions are preserved, and when you re-open the file, you will be presented with your workflow just as you left it. This is a great way to save your workflow for editing later on.


Continue reading Mac Automation: saving Automator workflows

AppleScript: Finder commands

Now that you've mastered the tell command, it's time to introduce some of the other AppleScript commands that you may encounter.

Location command
This command will allow you to open a specific location (either on your Mac or on a web server). This command is most often used with the Finder. For instance, if you wanted to open "www.tuaw.com," then you would type:

tell application "Finder" to open location "http://www.tuaw.com"

Remember, when dealing with an application always include quote marks around the application name. When you're typing a URL, be sure to include the prefix (HTTP:, AFP:, FTP:, etc.) and include quote marks around the URL. You can also tell a specific web browser to open the URL:

tell application "Safari" to open location "http://www.tuaw.com"

However, if you use the Finder version of the script, it will open your default browser.

Continue reading AppleScript: Finder commands

AppleScript: the Script Editor

Before you can build your first AppleScript you need to know some basics: what a script-able application is and how to use the Script Editor.

Script-able Applications
Basically, script-able applications are applications in which the developer has included a set of "instructions" that the Script Editor understands and can use. Some apps are not script-able but most Apple apps are and, of course, Mac OS X itself is script-able.

The Script Editor
The Script Editor is a very simple application, but it allows you to do some very powerful things. The Script Editor is located in your Applications folder (Applications : AppleScript : Script Editor.app) by default. The editor has a simple interface with a prominent text entry area. It also has 5 buttons in the toolbar; for now we will only focus on the "Run" and "Stop" buttons. The run button will run the currently typed script, and the stop button will cancel a running script.

Continue reading AppleScript: the Script Editor

Saving iPhone applications inside data URLs

This is really basically the same theory as the iPhone bookmarklets Mat posted earlier (squeezing content into a URL), but it's a little less about function and a little more about storage. Currently, the iPhone doesn't allow you to save actual files locally, but it does allow you save URLs, so the idea here is to save entire applications (or other HTML content) in the form of a data URL.

It's a pretty wonky hack, but it works-- you can convert whole HTML pages, or even applications, depending on the URL length the iPhone's bookmarks allow, into data URLs (with the Perl script on that page if you don't want to do it manually), and then those data URLs can be loaded into MobileSafari on the iPhone, even in Airplane mode. The suggestion is made that this could allow persistent storage for web applications on the iPhone, but wouldn't that require allowing the HTML page to write to and read from the iPhone's bookmarks? Is that possible?

At any rate, maybe it's a good thing, for a little while at least, that Apple didn't release a "real" SDK for the iPhone. Web programmers are making their code do all kinds of flips and tricks to get every bit of access they can on the iPhone. People have been talking about browser-based, OS independent applications for years-- maybe Apple's insistence that iPhone developers go through the browser will bring about that world sooner than we thought.

[via DF]

Platypus: create Mac applications from Ruby, Perl, shell scripts, etc.

MacResearch has posted a nice two part tutorial on using Platypus, a neat utility that allows you to "create native, flawlessly integrated Mac OS X applications from interpreted scripts." This include shell scripts, Perl, Ruby, Python, etc. With Platypus you can turn command-line only tools into full fledged, free-standing Mac applications that support drag and drop and even basic graphical feedback. Obviously this isn't going to make for a full GUI application, but it will allow you easily to create self-contained OS X applications that you can double-click to run. Especially for those in the science fields, and even for beginning (Ruby) script programmers like myself, Platypus makes it possible to get basic (and even not so basic) Mac app up and running very quickly.

Platypus is a free download from Sveinbjorn Thordarson, and donations are requested.

[Via MacResearch]

Update: fixed headline

PackRat 1.1 adds AppleScript and Automator support

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.

iTunes AppleScript to batch edit video metadata

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.

iTunes song tagging redux

We reported a method for tagging iTunes tracks and creating on-the-fly playlists way back in January. However, it involved using Quicksilver and a couple of home-grown scripts, but we can dig it if some of y'all aren't down with a tool as broad-reaching as Quicksilver. Fortunately for the rest of you, a web designer and developer named Steven Campbell has written up a basic method for tagging iTunes tracks and creating playlists based on those tags. It more or less involves revealing the comments column in the song list for easy access, and using a simple system of comma-separated words to get your iTunes tagging on. This can work wonders for Smart Playlists, and Steven offers a few examples in his post.

For those still interested in the aforementioned Quicksilver scripts and tools, the author has issued a bit of an upgrade and a new script since we first reported them. First of all, the scripts now live at their own domain name, TuneTag.com. The scripts still allow you to tag the song you're listening to on the fly and create on-the-fly playlists from those tags, but the author also added a new script that lets you select any number of tracks in iTunes and tag them all in one fell swoop. As a Quicksilver fan I'm already in love with the power of these scripts, but either method should work well for bringing the web 2.0 tagging craze to iTunes.

An Adium Xtra for linking any browser's current page

I know Adium can insert links from some browsers by itself, but I just found a script at the Adium Xtras site which offers much more fine-grained control over inserting a link from any browser, with the page name's descriptive title linked nice and clean, instead of the long ugly URL you get from copy/pasting. As you can see, specific commands are included for all the major browsers (and even some not-so-major ones), as well as a catch-all Default Browser command. The ones I can test seem to work pretty well, though I'll admit I don't have any copies of iCab or Netscape lying around. Enjoy.

Mail to iPod AppleScript

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]

Windows app cracks iTMS v6 DRM

JHymn users might remember that iTunes 6 broke the DRM-stripping tool, and it seems that Apple's done a good job of keeping FairPlay locked down - until someone cooked up QTFairUse6 for Windows. Yes, it's a Windows app, but it can apparently strip purchases from iTMS version 6.0.4 and above of their constraining DRM. QTFairUse6 isn't pretty either - it's a python script that involves some tinkering, but this might be good news to those who believe that if you love something, you should set it free.

[via Engadget]

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

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

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.

Pukka 1.3

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]

CamiScript 4.0

CamiScript, the script menu plugin for Camino, has been updated to version 4.0. This isn't quite a landmark release that enables Camino to fly around your room or tell you the future (besides, some day, the latter will be Google's job), but this new version does bring one big handy new feature: the ability to disable/enable the Extras menu.

CamiScript is free and can be had from nadamac; oddly, PimpMyCamino hasn't updated yet.

Next Page >

TUAW Features


Mac 101 ask-tuaw
Mac News
WWDC (250)
.Mac (57)
Accessories (635)
Airport (74)
Analysis / Opinion (1329)
Apple (1638)
Apple Corporate (556)
Apple Financial (187)
Apple History (45)
Apple Professional (54)
Apple TV (160)
Audio (446)
Bad Apple (118)
Beta Beat (150)
Blogging (84)
Bluetooth (16)
Bugs/Recalls (56)
Cult of Mac (870)
Deals (214)
Desktops (115)
Developer (252)
Education (98)
eMac (10)
Enterprise (138)
Features (399)
Freeware (382)
Gaming (361)
Graphic Design (31)
Hardware (1281)
Holidays (37)
Humor (576)
iBook (65)
iLife (234)
iMac (184)
Internet (325)
Internet Tools (1309)
iTS (967)
iTunes (796)
iWork (21)
Leopard (367)
Mac mini (112)
Mac Pro (53)
MacBook (202)
MacBook Air (79)
Macbook Pro (220)
MobileMe (16)
Multimedia (439)
Odds and ends (1437)
Open Source (278)
OS (912)
Peripherals (208)
Podcasting (182)
Podcasts (90)
Portables (197)
PowerBook (135)
PowerMac G5 (50)
Retail (579)
Retro Mac (48)
Rig of the Week (42)
Rumors (629)
Software (4305)
Software Update (406)
Steve Jobs (252)
Stocking Stuffers (50)
Surveys and Polls (97)
Switchers (112)
The Woz (34)
TUAW Business (237)
Universal Binary (281)
UNIX / BSD (61)
Video (902)
Weekend Review (82)
WIN Business (47)
Wireless (83)
Xserve (39)
iPhone/iPod News
iPhone (1490)
iPod Family (2024)
App Store (17)
SDK (14)
Mac Events
One More Thing (27)
Liveblog (1)
Other Events (226)
Macworld (489)
Mac Learning
AppleScript (3)
Ask TUAW (102)
Blogs (85)
Books (26)
Books and Blogs (62)
Cool tools (443)
Hacks (460)
How-tos (484)
Interviews (43)
Mods (186)
Productivity (586)
Reviews (107)
Security (154)
Terminal Tips (58)
Tips and tricks (564)
Troubleshooting (167)
TUAW Features
iPhone 101 (26)
TUAW Labs (3)
Blast From the Past (17)
TUAW Tips (141)
Flickr Find (35)
Found Footage (81)
Mac 101 (89)
TUAW Interview (31)
Widget Watch (198)
The Daily Best (1)
TUAW Faceoff (4)

RESOURCES

RSS NEWSFEEDS

Powered by Blogsmith

Sponsored Links

The Unofficial Apple Weblog (TUAW) bloggers (30 days)

#BloggerPostsCmts
1Cory Bohon871
2Robert Palmer5943
3Steven Sande5623
4Mat Lu3610
5Scott McNulty360
6Dave Caolo340
7Erica Sadun282
8Brett Terpstra210
9Mike Schramm182
10Michael Rose1334
11Christina Warren938
12Joshua Ellis44
13Lisa Hoover26
14Chris Ullrich12
15Jason Clarke11

Featured Galleries

Macworld 2008 Keynote
Macworld 2008 Build-up
Apple Vanity Plates
DiscPainter
Macworld Expo 2007 show floor
The Macworld Faithful in Line
iPhone First Look
AT&T 3G Coverage Map
MobileMe Guided Tour UI Changes

 

    Most Commented On (7 days)

    Recent Comments

    More Apple Analysis

    More from AOL Money and Finance

    Weblogs, Inc. Network

    Other Weblogs Inc. Network blogs you might be interested in: