Club MacMost Exclusive: Window Resizing Script

Here's an improvement to a one-line script I talked about a while back. This new script will prompt you to choose one of the running apps, and then one of the windows of that app. Then it will resize and position that window. I use this to resize windows perfectly before doing tutorials. You could do the same, or maybe you have another reason to want to tame your windows. I suppose you could expand the script more with variations on the position and size that you could choose from a list. Here is the code: var app = Application.currentApplication(); app.includeStandardAdditions = true; var system = Application("System Events"); var appList = Application("System Events").applicationProcesses.whose({ visible: true}).name(); var whichAppName = app.chooseFromList(appList, {withPrompt: "Select App:", defaultItems: ["Safari"]}); var whichApp = Application(whichAppName[0]); var windowList = whichApp.windows.name(); var whichWindowName = app.chooseFromList(windowList, {withPrompt: "Select Window:", defaultItems: windowList[0]}); if (whichWindowName != false) {     whichApp.windows[whichWindowName[0]].bounds = {"x":0, "y":0, "width":1280, "height":697}; }

Note: This is Club MacMost exclusive content. To view this video click the thumbnail below to go to the post as Patreon.com. Once there you will be able to view the video as long as you are logged into your Patreon account and a current supporter of MacMost at the "Club MacMost" or higher level.