Tip: Changing the Screen Resolution

Today I wrote a macro that changes my screen resolution. It's pretty ghetto, but it works.

I use a program called "EasyRes", which I think I got from the app store. It appears in the menu bar, with this icon:

image

When you click it, it gives you something like this, depending on your setup:

image

Note that it can show a lot more resolutions than what I show here - I just only show the ones I care about.

So all my macro does is click on the icon (using Found Image and limiting the area it searches to the menu bar). Then keyboard commands to move around the menus.

It works great, as long as you don't mind seeing the menu pop up and having to do a few pauses.

I don't know if this will help anyone, but I thought I'd share it.

KM has a Set Screen Resolution action. :wink:

1 Like

I've got one of those computers it doesn't work on. It gives an error number - I don't remember which one, but @peternlewis has mentioned it in another thread.

Oh, that's a shame. In case it's of interest (to you or anyone else): I have just seen this Web page, which suggests a solution using Applescript in KM to control a free utility called Display Menu. That could be worth trying (I can't do so right now).

Edit: MacOS 13 or above only.

Thanks! Since this works for me, I'll just stick with it. I don't need to do it often.

1 Like

I use the excellent Display Menu application. Specifically I'm using Version 2.2.5, the latest as of 2024-11-14.

As I developed a macro to use the AppleScript features, I ran into some hurdles. (Iā€™m using Sequoia 15.2 (24C5073e)/MacBookPro18,2, but I discovered the AppleScript issues before using Sequoia.)

YMMV, but here's what I found...

If the following AppleScript is run (after a new macOS login):

tell application "Display Menu"
	set listDisplays to list displays
	set theDisplay to item 1 of listDisplays
	set listResolutions to list resolutions on display theDisplay
	set AppleScript's text item delimiters to linefeed
	set txtResolutions to listResolutions as text
end tell

The following error is returned:

Display Menu got an error: The AppleScript feature has not been enabled in your copy of Display Menu, please upgrade.

If the AppleScript is run a second time, however, the following 60 resolutions are returned:

( expand / collapse )
3456 x 2160 120.0 Hz non-Retina
3456 x 2160 60.0 Hz non-Retina
3456 x 2160 59.9 Hz non-Retina
3456 x 2160 50.0 Hz non-Retina
3456 x 2160 48.0 Hz non-Retina
3456 x 2160 47.9 Hz non-Retina
2992 x 1870 120.0 Hz non-Retina
2992 x 1870 60.0 Hz non-Retina
2992 x 1870 59.9 Hz non-Retina
2992 x 1870 50.0 Hz non-Retina
2992 x 1870 48.0 Hz non-Retina
2992 x 1870 47.9 Hz non-Retina
2624 x 1640 120.0 Hz non-Retina
2624 x 1640 60.0 Hz non-Retina
2624 x 1640 59.9 Hz non-Retina
2624 x 1640 50.0 Hz non-Retina
2624 x 1640 48.0 Hz non-Retina
2624 x 1640 47.9 Hz non-Retina
2560 x 1600 120.0 Hz non-Retina
2560 x 1600 60.0 Hz non-Retina
2560 x 1600 59.9 Hz non-Retina
2560 x 1600 50.0 Hz non-Retina
2560 x 1600 48.0 Hz non-Retina
2560 x 1600 47.9 Hz non-Retina
2336 x 1460 120.0 Hz non-Retina
2336 x 1460 60.0 Hz non-Retina
2336 x 1460 59.9 Hz non-Retina
2336 x 1460 50.0 Hz non-Retina
2336 x 1460 48.0 Hz non-Retina
2336 x 1460 47.9 Hz non-Retina
1920 x 1200 120.0 Hz non-Retina
1920 x 1200 60.0 Hz non-Retina
1920 x 1200 59.9 Hz non-Retina
1920 x 1200 50.0 Hz non-Retina
1920 x 1200 48.0 Hz non-Retina
1920 x 1200 47.9 Hz non-Retina
3456 x 2234 120.0 Hz non-Retina
3456 x 2234 60.0 Hz non-Retina
3456 x 2234 59.9 Hz non-Retina
3456 x 2234 50.0 Hz non-Retina
3456 x 2234 48.0 Hz non-Retina
3456 x 2234 47.9 Hz non-Retina
2992 x 1934 120.0 Hz non-Retina
2992 x 1934 60.0 Hz non-Retina
2992 x 1934 59.9 Hz non-Retina
2992 x 1934 50.0 Hz non-Retina
2992 x 1934 48.0 Hz non-Retina
2992 x 1934 47.9 Hz non-Retina
2624 x 1696 120.0 Hz non-Retina
2624 x 1696 60.0 Hz non-Retina
2624 x 1696 59.9 Hz non-Retina
2624 x 1696 50.0 Hz non-Retina
2624 x 1696 48.0 Hz non-Retina
2624 x 1696 47.9 Hz non-Retina
2336 x 1510 120.0 Hz non-Retina
2336 x 1510 60.0 Hz non-Retina
2336 x 1510 59.9 Hz non-Retina
2336 x 1510 50.0 Hz non-Retina
2336 x 1510 48.0 Hz non-Retina
2336 x 1510 47.9 Hz non-Retina

Note that for my 16" MacBook Pro M1 Max, 132 resolutions should be returned.

Interestingly, if I run the following AppleScript, specifying one of the 60 returned resolutions from above (e.g., 2336 x 1510 60.0 Hz non-Retina)...

-- Requires Keyboard Maestro 8.0.3+
set kmInst to system attribute "KMINSTANCE"
tell application "Keyboard Maestro Engine"
	set kmResolutionToMomentarilyUse to getvariable "local_ResolutionToMomentarilyUse" instance kmInst
end tell

tell application "Display Menu"
	select resolution kmResolutionToMomentarilyUse
end tell

the display resolution is set as expected. Additionally if the first AppleScript is subsequently run, all 132 resolutions for my MacBook Pro are properly returned:

( expand / collapse )
3456 x 2160 120.0 Hz non-Retina
3456 x 2160 60.0 Hz non-Retina
3456 x 2160 59.9 Hz non-Retina
3456 x 2160 50.0 Hz non-Retina
3456 x 2160 48.0 Hz non-Retina
3456 x 2160 47.9 Hz non-Retina
2992 x 1870 120.0 Hz non-Retina
2992 x 1870 60.0 Hz non-Retina
2992 x 1870 59.9 Hz non-Retina
2992 x 1870 50.0 Hz non-Retina
2992 x 1870 48.0 Hz non-Retina
2992 x 1870 47.9 Hz non-Retina
2624 x 1640 120.0 Hz non-Retina
2624 x 1640 60.0 Hz non-Retina
2624 x 1640 59.9 Hz non-Retina
2624 x 1640 50.0 Hz non-Retina
2624 x 1640 48.0 Hz non-Retina
2624 x 1640 47.9 Hz non-Retina
2560 x 1600 120.0 Hz non-Retina
2560 x 1600 60.0 Hz non-Retina
2560 x 1600 59.9 Hz non-Retina
2560 x 1600 50.0 Hz non-Retina
2560 x 1600 48.0 Hz non-Retina
2560 x 1600 47.9 Hz non-Retina
2336 x 1460 120.0 Hz non-Retina
2336 x 1460 60.0 Hz non-Retina
2336 x 1460 59.9 Hz non-Retina
2336 x 1460 50.0 Hz non-Retina
2336 x 1460 48.0 Hz non-Retina
2336 x 1460 47.9 Hz non-Retina
2056 x 1285 120.0 Hz Retina
2056 x 1285 60.0 Hz Retina
2056 x 1285 59.9 Hz Retina
2056 x 1285 50.0 Hz Retina
2056 x 1285 48.0 Hz Retina
2056 x 1285 47.9 Hz Retina
1920 x 1200 120.0 Hz non-Retina
1920 x 1200 60.0 Hz non-Retina
1920 x 1200 59.9 Hz non-Retina
1920 x 1200 50.0 Hz non-Retina
1920 x 1200 48.0 Hz non-Retina
1920 x 1200 47.9 Hz non-Retina
1728 x 1080 120.0 Hz Retina
1728 x 1080 60.0 Hz Retina
1728 x 1080 59.9 Hz Retina
1728 x 1080 50.0 Hz Retina
1728 x 1080 48.0 Hz Retina
1728 x 1080 47.9 Hz Retina
1496 x 935 120.0 Hz Retina
1496 x 935 60.0 Hz Retina
1496 x 935 59.9 Hz Retina
1496 x 935 50.0 Hz Retina
1496 x 935 48.0 Hz Retina
1496 x 935 47.9 Hz Retina
1312 x 820 120.0 Hz Retina
1312 x 820 60.0 Hz Retina
1312 x 820 59.9 Hz Retina
1312 x 820 50.0 Hz Retina
1312 x 820 48.0 Hz Retina
1312 x 820 47.9 Hz Retina
1280 x 800 120.0 Hz Retina
1280 x 800 60.0 Hz Retina
1280 x 800 59.9 Hz Retina
1280 x 800 50.0 Hz Retina
1280 x 800 48.0 Hz Retina
1280 x 800 47.9 Hz Retina
1168 x 730 120.0 Hz Retina
1168 x 730 60.0 Hz Retina
1168 x 730 59.9 Hz Retina
1168 x 730 50.0 Hz Retina
1168 x 730 48.0 Hz Retina
1168 x 730 47.9 Hz Retina
960 x 600 120.0 Hz Retina
960 x 600 60.0 Hz Retina
960 x 600 59.9 Hz Retina
960 x 600 50.0 Hz Retina
960 x 600 48.0 Hz Retina
960 x 600 47.9 Hz Retina
3456 x 2234 120.0 Hz non-Retina
3456 x 2234 60.0 Hz non-Retina
3456 x 2234 59.9 Hz non-Retina
3456 x 2234 50.0 Hz non-Retina
3456 x 2234 48.0 Hz non-Retina
3456 x 2234 47.9 Hz non-Retina
2992 x 1934 120.0 Hz non-Retina
2992 x 1934 60.0 Hz non-Retina
2992 x 1934 59.9 Hz non-Retina
2992 x 1934 50.0 Hz non-Retina
2992 x 1934 48.0 Hz non-Retina
2992 x 1934 47.9 Hz non-Retina
2624 x 1696 120.0 Hz non-Retina
2624 x 1696 60.0 Hz non-Retina
2624 x 1696 59.9 Hz non-Retina
2624 x 1696 50.0 Hz non-Retina
2624 x 1696 48.0 Hz non-Retina
2624 x 1696 47.9 Hz non-Retina
2336 x 1510 120.0 Hz non-Retina
2336 x 1510 60.0 Hz non-Retina
2336 x 1510 59.9 Hz non-Retina
2336 x 1510 50.0 Hz non-Retina
2336 x 1510 48.0 Hz non-Retina
2336 x 1510 47.9 Hz non-Retina
2056 x 1329 120.0 Hz Retina
2056 x 1329 60.0 Hz Retina
2056 x 1329 59.9 Hz Retina
2056 x 1329 50.0 Hz Retina
2056 x 1329 48.0 Hz Retina
2056 x 1329 47.9 Hz Retina
1728 x 1117 120.0 Hz Retina
1728 x 1117 60.0 Hz Retina
1728 x 1117 59.9 Hz Retina
1728 x 1117 50.0 Hz Retina
1728 x 1117 48.0 Hz Retina
1728 x 1117 47.9 Hz Retina
1496 x 967 120.0 Hz Retina
1496 x 967 60.0 Hz Retina
1496 x 967 59.9 Hz Retina
1496 x 967 50.0 Hz Retina
1496 x 967 48.0 Hz Retina
1496 x 967 47.9 Hz Retina
1312 x 848 120.0 Hz Retina
1312 x 848 60.0 Hz Retina
1312 x 848 59.9 Hz Retina
1312 x 848 50.0 Hz Retina
1312 x 848 48.0 Hz Retina
1312 x 848 47.9 Hz Retina
1168 x 755 120.0 Hz Retina
1168 x 755 60.0 Hz Retina
1168 x 755 59.9 Hz Retina
1168 x 755 50.0 Hz Retina
1168 x 755 48.0 Hz Retina
1168 x 755 47.9 Hz Retina

Until the next logoff/login, the AppleScripts seem to run as expected.


I worked through the above issues and have a macro that I use often. I'll share it below with the following disclaimers:

  • Display Menu Version 2.2.5+ is required! It is free and available in the Mac App Store.

  • The macro includes customized logic for my mac models thus there are some actions that depend on the %MacName%. The macro will run for other mac models, but the Prompt With List will not be customized, i.e., the preferred resolutions for the model will not be highlighted.

  • The first time this macro runs after a macOS login, due to the aforementioned AppleScript anomalies, the macro will momentarily set the display resolution to the highest valid resolution.

  • It's possible that the AppleScript behavior will vary depending on the mac model; I've tested it on two MacBook Pro's (one Intel, one M1 Max).


This macro is designed to be run standalone or as a subroutine. The download includes a caller macro.

Set Display Resolution Macros.kmmacros (70.6 KB)

Macro-Image


If the resolution is not specified, the macro generates a Prompt With List that includes the resolutions that are valid for the mac display.

Rather than get a list of resolutions, I approached it the other way and have the palette/list the resolutions I want, i.e. not all that available.

In addition, instead of trying to workout which screen is what, It is hard coded for my layout which is Hp then Internal then the Toshiba screen.

I use this macro far more often than I expected.

See; Set Screen resolution for 1/2/3 screens and some KM Tips/Ideas