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

  • SEARCH
  • Home
  • 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 773763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:01:05+00:00 2026-05-14T19:01:05+00:00

The translation tool isn’t able to translate this working code. I copied it out

  • 0

The translation tool isn’t able to translate this working code. I copied it out of a working script.

set pathToTemp to (POSIX path of ((path to desktop) as string))

-- change jpg to pict
tell application "Image Events"
    try
        launch
            set albumArt to open file (pathToTemp & "albumart.jpg")
            save albumArt as PICT in file (pathToTemp & "albumart.pict")
            --the first 512 bytes are the PICT header, so it reads from byte 513
            --this is to allow the image to be added to an iTunes track later.
            set albumArt to (read file (pathToTemp & "albumart.pict") from 513 as picture)
        close
    end try
end tell

The code is taking a jpg image, converting it to a PICT file, and then reading the file minus the header (the first 512 bytes). Later in the script, albumArt will be added to an iTunes track.

I tried translating the code (minus the comments), but ASTranslate froze for a good 2 minutes before giving me this:

Untranslated event 'earsffdr'

#import "IEGlue/IEGlue.h"
IEApplication *imageEvents = [IEApplication applicationWithName: @"Image Events"];
IELaunchCommand *cmd = [[imageEvents launch] ignoreReply];
id result = [cmd send];

#import "IEGlue/IEGlue.h"
IEApplication *imageEvents = [IEApplication applicationWithName: @"Image Events"];
IEReference *ref = [[imageEvents files] byName: @"/Users/Doom/Desktop/albumart.jpg"];
id result = [[ref open] send];

#import "IEGlue/IEGlue.h"
IEApplication *imageEvents = [IEApplication applicationWithName: @"Image Events"];
IEReference *ref = [[imageEvents images] byName: @"albumart.jpg"];
IESaveCommand *cmd = [[[ref save] in: [[imageEvents files] byName: @"/Users/Doom/Desktop/albumart.pict"]] as: [IEConstant PICT]];
id result = [cmd send];

'crdwrread'

Traceback (most recent call last):
  File "objcrenderer.pyc", line 283, in renderCommand
KeyError: 'crdwrread'


'cascrgdut'

Traceback (most recent call last):
  File "objcrenderer.pyc", line 283, in renderCommand
KeyError: 'cascrgdut'


'crdwrread'

Traceback (most recent call last):
  File "objcrenderer.pyc", line 283, in renderCommand
KeyError: 'crdwrread'


Untranslated event 'rdwrread'

OK

I have no clue how to make sense of this.

Thanks for any and all help!

  • 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-14T19:01:06+00:00Added an answer on May 14, 2026 at 7:01 pm

    read is a Standard Additions command; ASTranslate doesn’t support scripting additions, only scriptable applications, so you will have to translate it yourself.

    Use ASDictionary to export the Standard Additions dictionary to HTML and create an objc-appscript glue (SAGlue). You can then use -[SAApplication init] to create a new SAApplication instance and send your read command to that.

    Alternatively, you could skip Standard Additions completely and use NSData to read and slice the file and build the NSAppleEventDescriptor yourself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i get this error {Method 'System.DateTime ConvertTimeFromUtc(System.DateTime, System.TimeZoneInfo)' has no supported translation to SQL.}
This isn't strictly a programming question, but I'm asking it here because it's certainly
If you know babylon translation tool you'd know its word capture feature - when
I'm building a general purpose data translation tool for internal enterprise use, using Java
What translation occurs when writing to a file that was opened in text mode
How can I view the intermediate translation done to JSP and JSPX pages by
I am trying to develop an online translation service (sort of a personal challenge)
Is there a way to combine a previous translation when extracting the csv file
my goal is to get lots of rows from a translation table. I use
I've been having a hard time trying to understand PyPy's translation. It looks like

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.