We recently updated our AppleScript/JXA APIs! This means increased and improved macOS application programmatic access to Windows, Tabs, and Spaces within Arc.
While we’ve included a few examples of things that you can now do with the new API below, you can also find the full docs as a Dictionary via the Script Editor
app on any Mac:
<aside> 🔹 For feedback or questions you can always find us by hitting CMD T > Feedback or send us a note on members.arc.net! We can’t wait to see what you’ll build.
</aside>
tell application "Arc"
get the title of every window
get the properties of front window
tell front window
/* do something */
end tell
end tell
You can use the every window
, front window
, and window <number>
commands to query for windows.
tell application "Arc"
make new window -- creates a new window
make new window with properties {incognito:true} -- creates a new incognito window
end tell
To open a new window, you can run the make new window
command in the application
scope.
tell application "Arc"
make new tab with properties {URL:"<https://arc.net>"}
end tell
To open a new Little Arc window, you can run the make new tab
command in the application
scope.
tell application "Arc"
tell front window
get the properties of every space
tell space 2
/* do something */
end tell
end tell
end tell