Skip to content

applescript

Search the iTunes Store from anywhere

This morning, I wanted to send someone an iTunes App Store search URL, so that when they clicked it, they'd see the list of matching apps in the iTunes App Store. There's no apparent easy way to do this within iTunes, but after much futzing about, I figured out how to structure a URL that will open to to the search results screen in the iTunes App Store.

Because Apple has separated iPhone apps and iPod apps in the store, there are actually two separate URLs, one for each type of app. The iPad version of the URL is:

itms://search.itunes.apple.com/WebObjects/MZSearch.woa/wa/advancedSearch?entity=iPadSoftware&free=0&genreIndex=1&media=software&restrict=false&softwareTerm=TERMS+TO+SEARCH+FOR&submit=seeAllLockups

And for the iPhone, it's identical except for the entity bit:

itms://search.itunes.apple.com/WebObjects/MZSearch.woa/wa/advancedSearch?entity=software&free=0&genreIndex=1&media=software&restrict=false&softwareTerm=TERMS+TO+SEARCH+FOR&submit=seeAllLockups

Hopefully obviously, replace TERMS+TO+SEARCH+FOR with the keywords you want to use for the search, separating words with the plus sign. You can then use the URL for whatever you like: send it to someone, add it to your bookmarks bar, whatever. When clicked, the search will run and the results will open directly in the iTunes App Store for either iPad or iPhone apps.

For example, iPad Apps related to the word foobar, or iPhone apps about hopping frogs.

You can further customize the URL to find anything you want—not just apps, and using additional criteria—within any of the various areas of the App Store. Read on for the details on how to do that.

[continue reading…]



Control is the key to avoiding needless dialog boxes

Over the weekend, I wrote myself a little AppleScript program that makes it much easier to create license files for our customers. (Given my lack of knowledge on AppleScript, I'm quite happy with the result.)

To make it easy to use on all my Macs, I stored the finished result in Dropbox. I tested it using my MacBook Pro, assigning it a global keyboard shortcut using Butler. It worked great; as soon as I typed the shortcut, I'd see my "Which program?" onscreen dialog, and all was good.

When I got back to my iMac, I used Butler to point to the same script on Drobpox, and tested it. I was very surprised to see that, instead of launching my app, OS X presented this dialog box:

Confused, I pulled out the MacBook Pro, and tested again…and again, it worked fine, launching without any confirmation dialog.

After many minutes of hair pulling, I figured out the problem: On the MacBook Pro, I had assigned the shortcut as Shift-Option-M; on the iMac, I decided that it'd be easier to type Shift-Control-M, so that's what I used (intending to change the MacBook Pro to the same shortcut). As soon as I removed the Control key from the shortcut, my application loaded without the confirmation dialog.

I've been unable to figure out why this happens, but if you're launching AppleScript apps via global shortcuts, avoid using the Control key in those shortcuts (unless you like needless confirmation dialogs, that is).