4 ms·
> and you won't miss anything. I would very much miss AppleScript support. It’s the number one reason I (and many users of my tools) don’t touch Firefox. Fortu
by latexr 3y ago
> and you won't miss anything.
I would very much miss AppleScript support. It’s the number one reason I (and many users of my tools) don’t touch Firefox. Fortunately, Webkit browsers (Safari, Orion) have got that covered. Unfortunately, Chromium browsers are a more common choice.
- HeckFeck 3y agoAh, got me :) How are you using AppleScript with your browser? It's something I've yet to explore on MacOS.
- latexr 3y agoSee my other answer: https://news.ycombinator.com/item?id=37475250 https://news.ycombinator.com/item?id=37475250
- lenkite 3y agoIsn't AppleScript effectively dead ? Apple disbanded the Mac Automation team back in 2016 and even fired the product manager AFAIK. At some point in time, it will be removed from the macOS stack and very few people will even notice.
- latexr 3y agoI used to think so too, but I have a ton of experience with AppleScript and its JavaScript counterpart and they’re still solid. JXA’s Objective-C bridge is a convenient way to access macOS APIs in a scripting language. One might think the introduction of Shortcuts would be the best time to retire AppleScript, yet Apple made it possible to run shortcuts via AppleScript and one of the standard tasks allows you to run AppleScript from within.
- fouc 3y agoSuper curious what you're doing with AppleScript + the browser. I definitely prefer Safari over Firefox. Haven't tried Orion yet but I'm super stoked there's another webkit browser.
- latexr 3y agoOne example is a script to quickly grab the URL of the current tab and send it to mpv¹ for playing or yt-dlp² for downloading. Or send some JavaScript to that same tab. Or grab the URLs and titles of all tabs in all windows that match a specific domain, close them, and then reopen them together in a brand new window (or save it to clipboard to send someone). Alfred³ has a ton of automations that allow you to do that without having to code it yourself. ¹ https://mpv.io https://mpv.io ² https://github.com/yt-dlp/yt-dlp https://github.com/yt-dlp/yt-dlp ³ https://www.alfredapp.com https://www.alfredapp.com
- fouc 3y ago> Or grab the URLs and titles of all tabs in all windows that match a specific domain, close them, and then reopen them together in a brand new window That sounds pretty useful! any chance that script is on gist.github.com or elsewhere?
- latexr 3y agoIt’s all done with Alfred’s Automation Tasks. https://www.alfredapp.com/help/workflows/automations/automation-task/ https://www.alfredapp.com/help/workflows/automations/automat...
- kjkjadksj 3y agoYou don’t need applescript to script events in firefox. You could probably do it in pure bash.
- latexr 3y agoI’m not scripting events, I’m extracting information from the open tabs, such as titles and URLs. See my other answer: https://news.ycombinator.com/item?id=37475250 https://news.ycombinator.com/item?id=37475250