Last active
December 3, 2024 10:47
-
-
Save jordansaints/7028459 to your computer and use it in GitHub Desktop.
An AppleScript script that grabs the URL of the currently open tab in Google Chrome and launches it in Firefox; most convenient when assigned to a keyboard shortcut.
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
-- Open Chrome's current tab in Firefox | |
-- by Jordan Saints, www.jordansaints.com | |
tell application "Google Chrome" | |
activate | |
end tell | |
delay 0.2 | |
tell application "System Events" to key code 37 using {command down} -- cmd+L FOCUS on URL in Chrome | |
delay 0.1 | |
tell application "System Events" to key code 8 using {command down} -- cmd+C COPY | |
tell application "Firefox" | |
activate | |
end tell | |
delay 0.5 | |
tell application "System Events" to key code 17 using {command down} -- NEW TAB | |
delay 0.1 | |
tell application "System Events" to key code 9 using {command down} -- cmd+V PASTE | |
delay 0.1 | |
tell application "System Events" to key code 36 -- ENTER! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment