Last active
September 23, 2022 21:01
-
-
Save LearnWebCode/7b3f1b495746e411645ccef54b8970bb to your computer and use it in GitHub Desktop.
macOS Tell Chrome & Safari to Be Certain Size in Certain Screen Position
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
tell application "Google Chrome" to activate | |
tell application "System Events" | |
tell process "Google Chrome" | |
click menu item "New Incognito Window" of menu "File" of menu bar 1 | |
end tell | |
end tell | |
tell first window of application "Google Chrome" to set bounds to {0, 109, 967, 658} | |
tell application "Safari" to activate | |
tell application "System Events" | |
tell process "Safari" | |
click menu item "New Window" of menu "File" of menu bar 1 | |
end tell | |
end tell | |
tell first window of application "Safari" to set bounds to {0, 0, 967, 633} | |
(* Add a command-line "record" alias with | |
code ~/.zshrc | |
At bottom of the file add: | |
alias record="osascript /Users/brad/Documents/Brads-AppleScripts/chrome.scpt" | |
*) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment