| |
|
|
|
| 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 a custom script. These instructions assume you are using QuicKeys 2.5.x with the iTunes Plug-in, version 4.7.1 of iTunes, and you are running Windows XP. Part 1: What does this script do? This is an example of how to create a script that let's 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. When your script is finished and the files are in place the new script will appear as an option in the Action pop-up menu of an iTunes Script shortcut. Once you've created a shortcut that makes use of this script, triggering it will bring up a new dialog window allowing you to set the play count of the current song or songs selected in iTunes. Part 2: The Visual Basic Script You'll need to create two text files for this custom iTunes plug-in script; the first one being a Visual Basic script. Copy the script from the text box below, paste it into a new NotePad** document, and save it with the name "setplaycount.vbs" into the following location:
**Don't use Word or WordPad to make your files! These apps may imbed text formatting information in the file, thus rendering the script a dud.
Part 3: The XML Description FIle The second file to be created is an XML Description File. Copy the contents from the text box below and paste it into a new NotePad** document. Save this file as "setplaycount.xml" into the same location as the vbs file:
Here is what your iTunes scripts folder should look like at this time: (screenshot) Part 4: Create the Action Open the QuicKeys editor and select the menu item Create -> iTunes Tools -> Script. Your new script should show up under the name "Set Song's Play Count" (screenshot) in the Action pop-up. Select this new type of script action, give it a hot key or other trigger, and click OK to save it. Part 5: Usage Use of this script is straight forward: Simply select the desired tracks within iTunes and hit your designated hot key or other trigger. In the resulting dialog enter the play count number you want iTunes to record/display for that batch of songs. All selected songs will receive the same Play Count number.
Want more? Visual Basic is not the only way to write these scripts, you could use Javascript as well for example. Visual Basic is the most popular scripting language so it was chosen for this example. Web searches will reveal numerous scripts and collections of scripts made for iTunes control. If you find something you like which we have not provided in the iTunes plug-in, you can use the method described on this page to add that functionality to QuicKeys. |
||||||
![]() |