Please pardon the infantile post-I'm completely poleaxed when it comes to Java, and have a basic understanding of HTML, so just looking for a bit of help.
Below is a .js I borrowed and am trying execute the script, except I also want an input form to popup asking for the comments I want appended to the iTunes comment field. I have no idea what I'm doing wrong. Any help is appreciated.
var ITTrackKindFile = 1;
var objApp = WScript.CreateObject("iTunes.Application");
var tracks = objApp.SelectedTracks;
var numTracks = tracks.Count;
var name = mycomment ("Enter comment", "Type the comment here");
var i = 0;
while (numTracks != 0)
{
var currTrack = tracks.Item(numTracks);
if (currTrack.Kind == ITTrackKindFile)
{
var storedComm = currTrack.Comment;
if (storedComm.match(/ mycomment /i) == null)
currTrack.Comment = storedComm + mycomment ;
}
numTracks--;
i++;
}
WScript.Echo ("The text has been appended to Comments.");
1 reply to this topic
#1
Posted 22 January 2011 - 12:17 PM
|
|
|
#2
Posted 27 January 2011 - 03:58 PM
I dont know much about javascript except that your problem may be here
Side Note:
JavaScript(scripting language) has no affiliation to Java(programming language) except name. You probably haven't been getting a response because this is a java help forum. This site does have a javascript forum though.
currTrack.Comment = storedComm + mycommentChange "mycomment" to "name" and see what happens because name is the variable that stores mycomment.
Side Note:
JavaScript(scripting language) has no affiliation to Java(programming language) except name. You probably haven't been getting a response because this is a java help forum. This site does have a javascript forum though.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









