Hi,
I've decided to learn a bit more about AppleScript and am using the latest xcode to make an AppleScript application to talk to iTunes.
I have 3 text fields on a blank form, and 2 command buttons. The basic idea is that you type the user playlist name and track number in and click the first command buttons and the program queries iTunes for the name of the track.
That bit works OK. But then the second command button tells iTunes to play the aforementioned track. This is where I'm having the problem.
I have one AppleScript file - jonathan.applescript.
The first "on clicked" section - on clicked ExecuteBNT has the code to take the inputs and retrieve the track name from iTunes. Once I typed that I typed in "end clicked" and then started another "on clicked" section - on clicked btnPlay and added my code to tell iTunes to play the track, ending with an "end clicked". This is all in the same one file.
But when I Build, I get the error "The <<event soVSclil>> handler is specified more than once (-2752)".
I can tell that for some reason it doesn't like more than one "on clicked" in one file, but can anyone help me on how to fix it?
Thanks
J.
I've decided to learn a bit more about AppleScript and am using the latest xcode to make an AppleScript application to talk to iTunes.
I have 3 text fields on a blank form, and 2 command buttons. The basic idea is that you type the user playlist name and track number in and click the first command buttons and the program queries iTunes for the name of the track.
That bit works OK. But then the second command button tells iTunes to play the aforementioned track. This is where I'm having the problem.
I have one AppleScript file - jonathan.applescript.
The first "on clicked" section - on clicked ExecuteBNT has the code to take the inputs and retrieve the track name from iTunes. Once I typed that I typed in "end clicked" and then started another "on clicked" section - on clicked btnPlay and added my code to tell iTunes to play the track, ending with an "end clicked". This is all in the same one file.
But when I Build, I get the error "The <<event soVSclil>> handler is specified more than once (-2752)".
I can tell that for some reason it doesn't like more than one "on clicked" in one file, but can anyone help me on how to fix it?
Thanks
J.