I've uploaded two files:
iTunes Library.xml
iTunes Music Library.xml
Now the file "iTunes Library.xml" is actually "iTunes Library.itl", but the forum would not let me upload a .itl, so make sure to re-name "iTunes Library.xml" to "iTunes Library.itl"
(iTunes Music Library IS an .xml, do NOT rename it)
The string I am looking for is in the "iTunes Music Library.xml" file. The string is in the beginning 15 or so lines of the file, and is located at:
<key>Library Persistent ID</key><string>THIS IS THE STRING</string>
The string is 16 characters long, and consists solely of capital letters and numbers.
This string is also present in the "iTunes Library.itl" file.
What I need to do is prompt the user with a question, asking if they are on the original computer, or the new computer. Should the user select the original computer, I want the program to:
Open the "iTunes Music Library.xml" file, and find the string from above.
If the user selects the new computer option, I want the program to:
Open the "iTunes Music Library.xml" file on the computer, search for the string, then use it to locate that string in the "iTunes Library.itl" file. It would then prompt the user to input a 16 character string. Once this is done, it would replace the string found in the "iTunes Music Library.xml" and the "iTunes Library.itl" files, with the one inputted by the user.
So for example:
Open "iTunes Music Library.xml"
Find the string after
<key>Library Persistent ID</key><string>
and before
</string>
Copy the string
Open the "iTunes Library.itl"
Find the copied string
Prompt the user for a new 16 character string
Replace the original string in both files, with the one inputted by the user.
I hope this is clear, and not to annoying for people
Thanks guys you are amazingly helpful :D
Liam.
P.S -- if you are trying to grasp what I want to do, visit the link I posted in my original post.