How can I play a specific song in iTunes via java?
How can I play a specific song in iTunes via java?
I'm guessing I need to somehow connect to iTunes and use the play feature with a specific parameter .... Can anyone point me in the right direction to see how to do this?
+1
Riptyde4
source
to share
2 answers
According to which the answer is , there is no API. For Windows, there is only SDK (via COM). On Mac OS iTunes is controlled by AppleScript ( example ).
+1
aphex
source
to share
Ik too late, but you can use apple script editor. eg,
Runtime runtime = Runtime.getRuntime();
String[] args = {"osascript" , "-e" , "tell application \"iTunes\" to play"};
try{
Process process = runtime.exec(args);
}catch (Exception ex) {
}
the song will play in itunes
0
chatti
source
to share