-
All replies
-
Helpful answers
-
May 8, 2015 3:06 PM in response to Comboby Camelot,Try:
function run(input, parameters) {
var app = Application('iTunes');
var artist_name = app.currentTrack.artist();
return artist_name;
}
Also, read up on https://developer.apple.com/library/mac/releasenotes/InterapplicationCommunicati on/RN-JavaScriptForAutomation/#//apple_r… which has a lot of detail on automation via JavaScript.
-
May 8, 2015 4:10 PM in response to Comboby Hiroto,Perhaps like this ?
function run(input, parameters) { return input[0].artist(); }Not tested, for I don't use OS X 10.10.
H
-
May 9, 2015 12:45 PM in response to Camelotby Combo,Ok, that's it !
I'm not familiar with AppleScript and in the doc, "artist" is a property, not a function. But I have to access it like a function with the ().
Thx.