5 ms·
Inline AppleScript Documentation
- sgt 4y agoUsed AppleScript as recently as 2018 - for a small commercial project even. It works great and I don't think anything else comes close, aside from proper programming/scripting which isn't a fair comparison for the typical AppleScript use-cases.
- navanchauhan 4y agoCan you talk a bit more about this? The only experience I have with AppleScripts, is attaching it to a folder so that any PDFs that were dropped in it were OCRed using Azure, and then converted to a blog post
- ace2358 4y agoThat’s pretty cool! I use AppleScript in my business for doing image conversion and sorting. It’s a pretty stealth feature built into the os that’s been there for years.
- sgt 4y agoYeah my thought too, that's a pretty cool use of AppleScript. Working with PDF's one generally wants to do from your own machine anyway, so it's ideal. You could even send documents or photos through to Azure's facial recognition API and order based on people/faces. Just an idea.
- sgt 4y agoIt was actually for remote control via iMessage. Rendered less useful nowadays due to Apple releasing an API for business (https://register.apple.com/resources/messages/msp-rest-api/ https://register.apple.com/resources/messages/msp-rest-api/)
- pram 4y agoI think the main problem AS has is you can accomplish a whole lot with Automator, and now Shortcuts.
- ace2358 4y agoI use AS inside my Automator actions along with shell scripts. It all works together!
- tempodox 4y agoHelpful Article. OSA is one more area where Apple's documentation is woefully lacking by now. For using JavaScript instead of AppleScript I don't find any docs at apple.com but on GitHub: https://github.com/JXA-Cookbook/JXA-Cookbook/wiki#table-of-contents https://github.com/JXA-Cookbook/JXA-Cookbook/wiki#table-of-c....
- lelandfe 4y agoYeah, they never released any documentation for it. They used to point people to the release notes as docs, but then archived all of it: https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/index.html https://developer.apple.com/library/archive/documentation/La... Yet another example of Apple archiving docs with no replacements.
- bobbylarrybobby 4y agoIt's not so so bad, they give JS examples alongside AS examples, e.g., https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/ManipulateText.html#//apple_ref/doc/uid/TP40016239-CH33-SW1 https://developer.apple.com/library/archive/documentation/La... In general though you don't really need separate JXA docs; you just need to know how to translate AS to JS and you're fine.
- tr3ntg 4y agoThis is very helpful. I’ve needed to search AppleScript-related questions occasionally and I’m usually disappointed. Nice to have more resources like this!
- favorited 4y agoI use AppleScript nearly every day, mostly to grab little bits of info from one app & tell another app to do something with it. For example, I have one that grabs the URL & page title of the foremost Chrome tab, switches to Terminal, and starts a youtube-dl process with the Chrome URL. It's just a little shortcut to download whatever I'm currently watching. It's wonderful because it's so much simpler than building a real integration or application, but it's also terrible because of (A) how tedious it is to actually write AppleScript and (B) how flaky/racy UI automation can be unless you're using great tools.
- bobbylarrybobby 4y agoAppleScript is a terrible yet reasonably well documented language. At the other end of the spectrum is JavaScript for automation (JXA), which exposes all the same APIs AppleScript does (modulo the spelling of function names), is a much more sane language, and is barely documented. I find that AppleScript is like bash and JXA is like python in terms of how complicated a script can be before you swift from the former to the latter.
- WirelessGigabit 4y agoHa. I run a shortcut on my phone to send the url to metube on my server.
- user3939382 4y agoOnly AppleScript has worse semantics than bash. It’s like working with a language that was designed by someone who read about other programming languages but never actually used one. I’m glad it’s there but I wish Apple would modernize it and give it some TLC. It’s obviously their last priority.