Comment Re:So it's not a browser anymore. (Score 1) 56
If you're using a Mac, check out AppleScript. A single AppleScript can send commands to multiple apps, telling the apps to get or set data, or to do other commands such as opening a window. An AppleScript can get data from one app, and send the data to another app.
For example, you can write an AppleScript that tells a Numbers spreadsheet to return selected data in the spreadsheet to the AppleScript. Then the AppleScript sends that spreadsheet data to Safari, and tells Safari to run a certain JavaScript in the frontmost Safari window. That JavaScript then executes, and displays the spreadsheet data in the Safari window.
Not all apps can respond to the same AppleScript commands. The set of AppleScript commands that an app can do depends on how "scriptable" the app's author made the app.