title: Parse a simple piece of text from a NSAppleEventDescriptor
body: <p>So I have simple applescript that returns (return "test") the following:</p>
  
  <p>NSAppleEventDescriptor: 'utxt'("test")</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/1247013/how-to-extract-applescript-data-from-a-nsappleeventdescriptor-in-cocoa-and-parse">this</a> question and tried to replicate what it was doing with the following code </p>
  
  <pre><code>NSAppleScript *scriptObject = [[NSAppleScript alloc]initWithContentsOfURL:[NSURL fileURLWithPath: scriptPath]
                                                                      error:&amp;error];
  returnDescriptor = [scriptObject executeAndReturnError: &amp;errorDict];
  NSLog(@"Return Discriptor,%@",returnDescriptor);
  
  NSAppleEventDescriptor *utxt = [returnDescriptor descriptorForKeyword:'utxt'];
  NSLog(@"Found utxt Discriptor: %@",utxt);
  
  NSString *scriptReturn = [utxt stringValue];
  NSLog(@"Found utxt string: %@",scriptReturn);
  </code></pre>
  
  <p>but it is not returning anything:</p>
  
  <p>Return Discriptor,
  Found utxt Discriptor: (null)
  Found utxt string: (null)</p>