Last active
November 15, 2022 01:33
-
-
Save SKaplanOfficial/4fc46576a4ef0f3a1fea9dd093ae2db5 to your computer and use it in GitHub Desktop.
Using PyXA to open a new tab or window of Safari
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tested with PyXA 0.1.0 | |
import PyXA | |
app = PyXA.Application("Safari") | |
new_tab = app.make("tab", {"URL": "http://google.com"}) | |
app.front_window().tabs().push(new_tab) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tested with PyXA 0.1.0 | |
import PyXA | |
app = PyXA.Application("Safari") | |
new_doc = app.make("document", {"URL": "http://google.com"}) | |
app.documents().push(new_doc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment