A popular new addition to the ResExcellence site is the iTunes Skins section. To install any of these skins within iTunes, you must:
Although this is pretty much a no-brainer, we can make it even easier using REALbasic.
This week we'll whip up a quick hack that makes this process a little more streamlined. It's not the flashiest project, but maybe it will give you some ideas for other useful hacks you can create with REALbasic.
Building the Interface
Launch REALbasic and open the default window, entitled Window1. Add a Listbox to the window. We will display the resources types from the skin file here. Feel free to spruce up the interface any other way you see fit. A sample interface might look like this:
Define the File Types
Since we want to work with two kinds of files (the skin file and the iTunes application itself), we need to describe them to REALbasic. Select Edit->File Types... and define two types of files:
For the ResEditFile file type, enter the following infortmation:
For the iTunes file type, enter this data:
Add the Code
Now that we have built the interface and defined the file types our project will use, it's time to add the code. The main idea behind this project is to copy all of the resources from the resource fork of a ResEdit skin file to the resource fork of iTunes. Right now would be a good time to make a backup copy of iTunes, since you will be modifying the iTunes application.
To simplify matters, we will permit a user to drag a skin file into thw interface window. To make the window drag and drop aware, add this code to the Open event of Window1:
me.acceptfileDrop("ResEditFile")Finally, add this code to the DropObject event of Window1:
dim i, j, rcount, thisresourcenumber as integerConclusion
As usual, you can download the project and completed application. If you are an astute ResExer, you may realize that this project could be easily modified to work with a number of ResExcellence hacks and improvements. This project lends itself well to any instance where you need to copy resources from one file to another. Happy experimenting!