
Originally Posted by
CArringt
ok i have a question and based on the answer i have a quick extension idea.
This program is written in objective c. is there anyway to embedd an applescript?
Look into NSAppleScript and NSAppleEventDescriptor, something like:
Code:
NSAppleScript *myAppleScript = [[NSAppleScript alloc] initWithSource:@"tell application \"iTunes\"\nget rating of current track\nend tell"];
NSAppleEventDescriptor *result = [myAppleScript executeAndReturnError:nil];
if([result length]>0)
//Handle the string with [result stringValue] or whatever type it is;
Bookmarks