Hello azaksalmarzur28,
Thank you for your reply. I was able to achieve what I wanted with the Run AppleScript inside of the Apple Shortcuts app, just like you suggested. Then I just added the Shortcuts widget to my Mac desktop so I can make it run with one click.
I made some changes, now it opens six different Safari windows (four windows on my main monitor + two windows on my secondary monitor). For anyone else who might find it useful, just replace the URLs with your websites of choice and make sure the screen resolutions fit your monitors.
-- CONFIGURATION - URLS
set url1 to "https://www.apple.com/mac" -- REPLACE with your first URL
set url2 to "https://www.apple.com/iphone" -- REPLACE with your second URL
set url3 to "https://www.apple.com/watch" -- REPLACE with your third URL
set url4 to "https://www.apple.com/apple-vision-pro" -- REPLACE with your fourth URL
set url5 to "https://www.apple.com/airpods" -- REPLACE with your fifth URL
set url6 to "https://www.apple.com/tv-home" -- REPLACE with your sixth URL
-- CONFIGURATION - MAIN MONITOR
-- IMPORTANT: Check System Settings > Displays.
-- Enter the "Looks like" resolution (Logical resolution), NOT the physical specs.
set logicalWidth to 1920 -- REPLACE with your main monitor's logical width (e.g., 1920, 2560, 3024)
set logicalHeight to 1080 -- REPLACE with your main monitor's logical height (e.g., 1080, 1440, 1600)
set secondaryLogicalWidth to 864 -- REPLACE with your secondary monitor's logical width (e.g., 1920, 2560, 3024)
set secondaryOffset to logicalWidth
-- HELPER FUNCTION - IGNORE THIS
on makeSafariWindow(theURL, x1, y1, x2, y2)
tell application "Safari"
make new document with properties {URL:theURL}
set bounds of front window to {x1, y1, x2, y2}
end tell
end makeSafariWindow
-- 1. SAFARI (4 Windows, 25% width each on Primary Screen)
tell application "Safari"
activate
-- Window 1
my makeSafariWindow(url1, 0, 0, logicalWidth / 4, logicalHeight)
-- Window 2
my makeSafariWindow(url2, logicalWidth / 4, 0, (logicalWidth / 4) * 2, logicalHeight)
-- Window 3
my makeSafariWindow(url3, (logicalWidth / 4) * 2, 0, (logicalWidth / 4) * 3, logicalHeight)
-- Window 4
my makeSafariWindow(url4, (logicalWidth / 4) * 3, 0, logicalWidth, logicalHeight)
end tell
-- 2. SAFARI (Window 5 on left portion of Secondary Screen)
tell application "Safari"
activate
my makeSafariWindow(url5, secondaryOffset, 0, secondaryOffset + secondaryLogicalWidth, logicalHeight)
end tell
-- 3. SAFARI (Window 6 on right portion of Secondary Screen)
tell application "Safari"
activate
my makeSafariWindow(url6, secondaryOffset + secondaryLogicalWidth, 0, secondaryOffset + (secondaryLogicalWidth * 2), logicalHeight)
end tell