Check / Uncheck the “Open using Rosetta” Check Box in an App's Finder-Info Window

Many new applications (I’m using Pro Tools) can run under Rosetta or Native Apple silicon by opening the get info window and checking or unchecking the “open using Rosetta” selection.

I would like to write an AppleScript to make the selection and then open the app – I go back and forth many times an hour.

This simple script opens the window:

tell application "Finder"
   open information window of application file "Pro Tools.app" of folder "Applications" of startup disk
end tell

But I can’t seem to make the “open using Rosetta” selection.

Hey @100below,

Welcome to MacScripter! :sunglasses:

I won’t guarantee this to work on your system without some adjustment – I’m still using Mojave – nevertheless it should be close.

  • Change the BBEdit path to Pro Tools.
  • Change the button name appropriately.
    • I’m using the “Locked” button as an example.
  • Once working correctly you can comment-out the activate line and let it work in the backbround.

I’d think it’d be possible to directly launch an app into Rosetta via script without having to monkey with the switch, but not being able to test I won’t even bet a beer on it.

-Chris

set appPath to "/Applications/Applications_Chris/Text_Editors/BBEdit/BBEdit.app"
set appRef to appPath as «class furl»

tell application "Finder"
   activate
   open information window of application file appRef
end tell

tell application "System Events"
   tell application process "Finder"
      tell front window
         tell scroll area 1
            tell checkbox "Locked"
               perform action "AXPress"
            end tell
         end tell
      end tell
   end tell
end tell

Thank you! I tried “click at”, which seems to work. Any way to return the current state of that selection box?

You should be able to ask the object for its value.

Thanks for this!

I’ve one question, I use this for Adobe Acrobat and it is only working when I put Acrobat app out of it’s own folder (Adobe Acrobat DC). Is there a way to target Acrobat in it’'s own application folder?

I tried this:
its setUsingRosetta:true withAppName:"Adobe Acrobat DC/Adobe Acrobat.app"

It returns this error:

error "Finder got an error: application file "Adobe Acrobat DC/Adobe Acrobat.app" or folder "Applications" or startup disk cannot be retrieved. " number -1728 from application file “Adobe Acrobat DC/Adobe Acrobat .app” or folder “Applications” or startup disk

Thanks, this works now!

I prefer to non-GUI Scripting solutions…

Nice. Where’s the script?

http://piyocast.com/as/archives/15646

1 Like