Neat. Iāve actually added an action for 7.0 āConceal All Palettes Until Switchā to get rid of them while watching videos in Safari full screen, but the other monitor is still visible. I had on my todo list an action to blank a monitor, but it did not quite make the cut for 7.0, but Desktop Curtain looks like itād solve the problem nicely, especially with this macro.
I donāt quite understand the need for this, since Desktop Curtain can do this on its own. Thereās an isolate mode that isolates the frontmost app. Activated I think it does what you do here. Am I mistaken?
āNeedā would certainly be too strong : - ) Just my solution to a two-step dance I found myself doing each time I first switched DC on ā it would āhello worldā and at first hide everything, so the second step would be to retrieve the app.
( I personally find it a bit less distracting to be able to fire it up, when I want it, without losing visibility of the app I am typing into )
( Also an experiment in doing something generic ā you should, for example, be able to change the app name string to something like āHazeOverā)
Yes, it really seems like there needs to be a way to launch Desktop Curtain in the background without making any changes to the screen, and then ask it to focus the front window, or blank out the screen. I played with it a bit but couldnāt get it to do what I wanted - which is basically just to blank out my second monitor when Iām full screening in Safari on my main monitor.
You guys are right. I just tested it and the way it used to work before it was the way @ComplexPoint scripted it here. Weird. Iāll have to ask Peter (Maurer) if they have changed things here or there.
@ComplexPoint: Nice work on the JavaScript stuff by the way. Been reading the code for a while now. Good to see this is catching on. (Would love to do something more with JXA.)
I agree ā JXA works very well with Keyboard Maestro automation, and of course Javascript skills pay off on iOS, and the web, and in all the wealth of the npm library and the Atom editor etc too.
For KM macros and plugins, I particularly like:
Much more flexible records, which work transparently with JSON.stringify() and JSON.parse()
asking a record/object for a list of its keys
(for key in record) looping etc
simple testing of whether a record/object contains a field/key, etc
first class functions, with built in map, reduce and foreach which save scripter time and ink, while helping clarity and structure too
the rich library ( just reaching for things like decodeURI()encodeURI() and all the other string (including regex) functions for example, without hacks or dependencies
and a lot of little details and flexibilities like being able to set the string of Application(strName) at run-time
Worth moving to Yosemite for, especially now that itās mature enough for the next iteration of OS X to start : - )
Iāve talked with Rob from Many Tricks about this problem here, and they sent me a beta that isolates the front window correctly. This change will make it into the next release.