Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6180985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:56:28+00:00 2026-05-24T00:56:28+00:00

So I have simple applescript that returns (return test) the following: NSAppleEventDescriptor: ‘utxt'(test) I

  • 0

So I have simple applescript that returns (return “test”) the following:

NSAppleEventDescriptor: ‘utxt'(“test”)

I found this question and tried to replicate what it was doing with the following code

NSAppleScript *scriptObject = [[NSAppleScript alloc]initWithContentsOfURL:[NSURL fileURLWithPath: scriptPath]
                                                                    error:&error];
returnDescriptor = [scriptObject executeAndReturnError: &errorDict];
NSLog(@"Return Discriptor,%@",returnDescriptor);

NSAppleEventDescriptor *utxt = [returnDescriptor descriptorForKeyword:'utxt'];
NSLog(@"Found utxt Discriptor: %@",utxt);

NSString *scriptReturn = [utxt stringValue];
NSLog(@"Found utxt string: %@",scriptReturn);

but it is not returning anything:

Return Discriptor,
Found utxt Discriptor: (null)
Found utxt string: (null)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T00:56:29+00:00Added an answer on May 24, 2026 at 12:56 am

    It seems to me that returnDescriptor is already the descriptor and you wouldn’t need this: [returnDescriptor descriptorForKeyword:’utxt’];. I didn’t test this code but give it a try…

    NSDictionary *errorDict = nil;
    NSAppleScript *scriptObject = [[NSAppleScript alloc]initWithContentsOfURL:[NSURL fileURLWithPath:scriptPath] error:&errorDict];
    if (errorDict) {
       NSLog(@"Error: %@", errorDict);
       return;
    }
    NSAppleEventDescriptor *returnDescriptor = [scriptObject executeAndReturnError: &errorDict];
    if (errorDict) {
       NSLog(@"Error: %@", errorDict);
       [scriptObject release];
       return;
    }
    
    NSString *scriptReturn = [returnDescriptor stringValue];
    NSLog(@"Found utxt string: %@",scriptReturn);
    [scriptObject release];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a very simple AppleScript to close tabs in Safari. The problem
I have a simple 'repeat with' in an AppleScript, and would like to move
I have simple win service, that executes few tasks periodically. How should I pass
I have simple code: <?php error_reporting(E_ALL); ini_set('display_errors', true); ini_set('html_errors', false); $test = array(); $test
i have simple side menu with this html code : <div id=menu> <div> Menu
I am trying to create a simple Applescript that is activated each time I
If I have an applescript snippet such as this tell application Finder set thePath
I have simple front controller plugin which contains this code: http://pastebin.com/m155c59b0 When session expire
I have simple test project which creates a frame and adds one JTextPane to
I have simple login form in my website. In given requirements stands, that password

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.