| |
|
|
|
| Company | Partners | Products | Purchase | Download | Support |
February 2005 The introduction and general description of this tutorial were covered in the February 2005 issue of TRIGGERED. This web page is meant to provide more detailed instructions on how to set up the shortcuts themselves. These instructions assume you are using QuicKeys X3 running on Mac OS X 10.3 or newer. Part 1: Preparation A pair of AppleScript type shortcuts are being provided in this tutorial. They are simple to set up within QuicKeys and no knowledge of AppleScript is necessary. However if you care to do some searching you can easily find dozens of iTunes-specific AppleScripts which with a bit of modification can be tailored to your needs and placed inside QuicKeys for easy access and integration with mutli-step shortcuts. The first example shows how to create a QuicKeys shortcut containing a script that lets you set the play count of the currently selected song or songs. This is useful for building iTunes Smart Playlists which can make use of various song data such as its star-rating and the number of times it's been played. iTunes alone does not allow you to directly set this number. Part 2: Set Play Count 1. Open the QuicKeys editor and select Scripting -> AppleScript from the Create menu. 2. Copy the script from the text box below and paste it into the resulting QuicKeys AppleScript shortcut window.
3. Your shortcut should look like the following screenshot; you may want to click the Check Script button to ensure you made no errors copying and pasting the text.
4. You will also want to change the Step Results for Step Failure on this shortcut. Imagine you accidentally start changing the play count of the wrong song so you hit cancel... this causes the imbedded AppleScript to report an "error" to QuicKeys. Rather than deal with a QuicKeys error any time we cancel an AppleScript shortcut, it is best to just change the step results from "Stop shortcut & notify me" to simply "Stop shortcut". To do this, click on the Step Results icons in the lower right corner of the shortcut window and select Stop shortcut from the step failure pop-up in the resulting Inspector window. Give this shortcut a hot key or other trigger, name it, save it, and you're done. Fire up iTunes, select a song or songs, and try it out.
Part 2: Rate Current (playing) Song The second example shows how to create a QuicKeys shortcut containing a script that lets you set the "star rating" of the song currently playing. I find this one particularly useful, allowing me to press a hot key combination and assign a new star rating to a song on the fly without even opening the iTunes window. 1. Open the QuicKeys editor and select Scripting -> AppleScript from the Create menu. 2. Copy the script from the text box below and paste it into the resulting QuicKeys AppleScript shortcut window.
3. Your shortcut should look very much like the previous screenshot; you may want to click the Check Script button to ensure you made no errors copying and pasting the text. 4. You will also want to change the Step Results for Step Failure on this shortcut for the same reason we changed it in the previous shortcut. Give this shortcut a hot key or other trigger, name it, save it, and you're done. Fire up iTunes, play a song and try it out.
Do it yourself There are literally hundreds of public domain iTunes-specific AppleScripts available on the web, just search on terms like "applescript control itunes" and "applescripts for itunes". The only caveat I have for using these scripts within QuicKeys is that some of them were written with the assumption that they'd be activated from the Scripts menu within iTunes. By moving these scripts inside QuicKeys shortcuts, the resulting dialogs (such as the one for setting the Play Count in our examples) will actually be generated by QuicKeys rather than iTunes. To ensure smooth operation of my AppleScript shortcuts I've added this bit of code to the top of some of my scripts to ensure QuicKeys is pulled to the front before any dialogs are brought up:
Seven simple scripts QuicKeys X3 shipped with five iTunes-specific shortcuts/scripts installed for new users of the product. However if you had an earlier version of QuicKeys in place these default shortcuts were not installed for you. They are available on the disk image, or in this linked archive. I've also included the two shortcuts given as examples in this tutorial. To use these shortcuts, download the archive, unzip the archive by double-clicking it, then open QuicKeys and select Import Shortcuts from the File menu. Navigate to the file named "QuicKeys iTunes Shortcuts" and click Open to import them. These imported shortcuts will be easy to find in your shortcuts list as they all have names beginning with "iTunes". Assign them the hot key triggers you like and/or delete the shortcuts you don't want as you see fit. |
||||||
![]() |