17 ms·
I'm not trying to serve data to Safari (usually), I'm trying to read data from Safari. I often need to get the source of a webpage that's already loaded after a
by peterburkimsher 9y ago
I'm not trying to serve data to Safari (usually), I'm trying to read data from Safari. I often need to get the source of a webpage that's already loaded after a login screen, or with some user interaction.
For example, scrolling down to load all my Facebook messages into the left-hand bar. Or segmenting text into 5000-character blocks, copy-pasting into Google Translate, and getting the output.
With any command-line tools, it would be a hassle, if it's possible at all. With AppleScript, it's easy.
- jcelerier 9y ago> For example, scrolling down to load all my Facebook messages into the left-hand bar. sounds like an X-Y problem. Why wouldn't you just use the facebook API ?
- peterburkimsher 9y agoI don't think there's an API to export all my messages.
- waddlesplash 9y agoYou realize that "hey" is just the command-line interface to Haiku's view scripting system, right? We don't have a JS/Python interface (yet), but the C++ interface is well documented (see this: https://www.haiku-os.org/legacy-docs/bebook/TheApplicationKit_Scripting.html https://www.haiku-os.org/legacy-docs/bebook/TheApplicationKi... for an introduction, and also hey's source code: https://github.com/haiku/haiku/blob/master/src/bin/hey.cpp https://github.com/haiku/haiku/blob/master/src/bin/hey.cpp).