Hey guys, I’ve searched the web for hours trying to figure out a script that I can put into Shortcuts to run two instances of Outlook and then two instances of Chrome and then have them move to specified monitors and split screen.
macOS GUI application instance is one. Because it is macOS not Windows. OK?
You can open multiple windows of those applications.
You can move each window to specified display.
Split winodw (tiling window) is not AppleScript task.
I may not understand what Piyomaru is saying, but an AppleScript can be used to tile windows. The following is a very-simple example:
-- this assumes a screen resolution of 1920 x 1080 with no visible dock
-- a better approach would be to get visible screen area with ASObjC
tell application "System Events" to tell process "Safari"
set position of window 1 to {1, 25}
set size of window 1 to {959, 1055}
set position of window 2 to {961, 25}
set size of window 2 to {959, 1055}
end tell
BTW, recent versions of macOS have a “Split View” feature, which is a bit different than simply tiling windows. Perhaps that’s what is being discussed here.
I believe there’s a subcategory in this forum specifically for Sborcuts.
I don’t know how to do all of these things, but I can show you how to do a couple of the steps as a starting point, in case it’s useful.
You can do this using a Run Shell Script action.
The following example shell script code would launch a new instance of Google Chrome:
open -n -a "Google Chrome"
The -n flag is key for launching a new instance of an application in addition to any instances already running. You can replace "Google Chrome" with the name of any other application, which is best to enclose within double quotes.
Opening apps in split screen mode can be done using the Split Screen action. The action takes two inputs:
Split screen between ⟨input #1⟩ and ⟨input #2⟩
The limitation here is that both inputs are selected within the Shortcuts app, which provides a list of available applications. This might make selecting specific instances of an application tricky.
Apps in split screen occupy their own desktop space. I’ve not worked with multiple monitors for a long time, so I’m not sure how to have a specific space displayed on a specific monitor.
There is a shortcut action named Split Screen Apps, and Apple states that this action will “open the specified apps in split screen mode.” On my Sonoma computer with one monitor only, the Split Screen action opens the specified apps (Safari and Mail in my testing) tiled to the left and right side of the screen, not in Split View mode. There’s no way to know which the OP wants for sure, but I would not automatically assume he wants Split View mode.