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 could try this.

its setUsingRosetta:true withAppName:"Pro Tools.app"

on setUsingRosetta:boolValue withAppName:appName
	tell application "Finder"
		set theInfo to open information window of application file appName of folder "Applications" of startup disk
	end tell
	-- Set using rosetta to true/false
	its openUsingRosetta(boolValue)
	-- Close information window
	tell theInfo to close
end setUsingRosetta:withAppName:

on openUsingRosetta(boolValue)
	tell application "System Events"
		tell application process "Finder"
			tell front window
				tell scroll area 1
					if value of checkbox 1 is not boolValue as integer then
						click checkbox 1
					end if
				end tell
			end tell
		end tell
	end tell
end openUsingRosetta
1 Like

You should be able to ask the object for its value