Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ttepasse/2a65d8d2c2567118cc70ed76fffb5f6b to your computer and use it in GitHub Desktop.
Save ttepasse/2a65d8d2c2567118cc70ed76fffb5f6b to your computer and use it in GitHub Desktop.
open chrome tabs in safari
var chrome = Application('Google Chrome');
var safari = Application('Safari');
safari.includeStandardAdditions = true; // Needed for openLocation()
chrome.windows[0].tabs().forEach(function (tab) {
safari.openLocation( tab.url() );
});
@ttepasse
Copy link
Author

ttepasse commented Apr 4, 2016

Frankly I'm not convinced of Javascript for Automation. The function call for getting properties is awkward, the whose-Construct for filtering arrays even more so. But more annoying is the lack of discoverability. I miss IDE-like completion and something REPL-like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment