title: How to get variable value of applescript in cocoa?
body: <pre><code>    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init] ;
  
   NSAppleEventDescriptor *eventDescriptor;
   NSAppleScript *script ;
   NSString* source ;
   NSDictionary* errorDic ;
  
   source=@"tell application \"iTunes\" \n"
   @"set tname to name of track 1 of playlist 1 \n"
   @"set tartist to artist of track 1 of playlist 1 \n"
   @"set talbum to album of track 1 of playlist 1 \n"
   @"set ttime to time of track 1 of playlist 1 \n"
   @"set tbitrate to bit rate of track 1 of playlist 1 \n"
   @"set tsize to size of track 1 of playlist 1 \n"
   @"set trating to rating of track 1 of playlist 1 \n"
   @"end tell";
  
   script = [[NSAppleScript alloc] initWithSource:source];
   eventDescriptor = [script executeAndReturnError:&amp;errorDic];
   NSString* frontUrl = [eventDescriptor stringValue];
   NSLog(frontUrl);
  
   /*NSAlert *alert = [[NSAlert alloc]init];
   [alert setMessageText:frontUrl];
   [alert runModal];
   [alert release];*/
  
   [pool release] ;
  </code></pre>
  
  <p>NSlog only display a track rating. How to get value of tname,tartist,talbum,etc ?'</p>
  
  <p>Thanks in advance</p>