SPB Git

Repository Public Research preview

open-window.applescript 423 B 11 lines

1-- Open a URL in a NEW Safari window and print that window's id.2-- Usage: osascript open-window.applescript "https://example.com/"3-- Keep the id: it is stable for the life of the window, unlike "window 1" or "front window",4-- which change whenever the user clicks another window.5on run argv6	tell application "Safari"7		make new document with properties {URL:(item 1 of argv)}8		return id of window 19	end tell10end run11
Files main
Menu

Theme