Created
December 18, 2021 13:41
-
-
Save tgambee/e8c0ffe8a0f39e83a6425c548d91cbc7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
set appName to "Google Chrome" | |
if application appName is running then | |
tell application "Google Chrome" to activate | |
delay .5 | |
tell application "System Events" to ¬ | |
keystroke "n" using ¬ | |
{shift down, command down} | |
delay .5 | |
tell application "Google Chrome" | |
set myTab to make new tab at end of tabs of window 1 | |
set URL of myTab to the clipboard | |
end tell | |
else | |
do shell script "open -a /Applications/Google\\ Chrome.app --args --incognito" | |
delay .5 | |
tell application "Google Chrome" to activate | |
delay .5 | |
tell application "Google Chrome" | |
set myTab to make new tab at end of tabs of window 1 | |
set URL of myTab to the clipboard | |
end tell | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment