1

My mother has a the 30-inch LED Cinema Display, which is a bit too large for her everyday use. She prefers to use it in 1680x1050 or 1600x1200 modes, and can then switch to 1920x1080 for watching movies (Netflix, etc).

This switching is easily accomplished by Retina DisplayMenu, which lives in the menubar. The problem is that there are lots of different resolutions listed there, and she has a hard time remembering which ones are the right ones. I have previously created two AppleScripts, which I bundled into applications, that use GUI commands to switch resolutions; these can be run from Spotlight.

I'm thinking it would be neat to run at least the "movie mode" script when certain websites (e.g. Netflix) load. Is there any way (besides a constantly running script that polls each browser page for its URL) to trigger a script when a specific page is loaded?

  • 1
    You asked, "Is there any way (besides a constantly running script that polls each browser page for its URL) to trigger a script when a specific page is loaded?", and just for practical reasons, I'm going to say no and make a suggestion. Since making the decision to go to Netflix is typically a deliberate one, I'd suggest using AppleScript to open a new browser window, setting its bounds or go into full screen mode, load the target URL, and change the display resolution. Save it as an app and place it in the Dock for her to click on when she wants to watch something at Netflix. – user3439894 Aug 5 '17 at 15:28
  • 2
    As to the two different resolutions, when I need to toggle between two different states of something I write it in a single script that toggles between the two states based on the current state of the target and save it as an application, not use two different scripts. As a matter of fact, all of this could be written in a single script to handle everything toggling between the two states and handling the browser. Now while I did say "I'm going to say no" in my first comment, let say that there my be a Safari Extension or you create one that can trigger an event if a given URL is loaded. – user3439894 Aug 5 '17 at 15:28

You must log in to answer this question.

Browse other questions tagged .