vitor Posted June 8, 2021 Share Posted June 8, 2021 (edited) Scriptability matters for Alfred Workflows, so this is a short thread on what we know about scriptability on the new macOS version. Discussion and new data is welcome; I’ll strive to keep this top post up to date with the most relevant information. Python, Perl, and Ruby survived in the same versions as Big Sur, but PHP was removed. Shortcuts is coming to macOS, but it doesn’t mean the end of AppleScript yet: Quote Advanced scripting Pro users can enable AppleScript and shell script compatibility. The Shortcuts app will scriptable, though the functionality isn’t yet available. It will also have a command-line tool: Quote Known Issues The Shortcuts command-line tool doesn’t support signing. (74999291) (…) Shortcuts isn’t scriptable. (78609585) On June 8 there was a session going more in-depth into Shortcuts. Notable points: “We also added two new automation types for Focus and Sound Recognition”. “By the way, if your app integrates with file providers, these new Files actions will automatically work with the files that your app provides”. “We also have a new file format that lets you distribute Shortcuts as files“. (…) “This means that you can distribute your own Shortcuts on your website or in your app”. Which means we may be able to distribute Shortcuts as complements to Workflows. For M1 Macs, that may open a window to distribute everything needed to control iOS apps from Alfred. However, it’s unclear if we’ll need a ($99/year) Developer Account to distribute them in useful form, since they mention signing: “Shortcuts files are notarized by Apple to make sure they’re safe”. (…) “a new mode for sharing Shortcuts privately” (…) “Shortcuts files are signed with the identity of the person who sent them. If you need to re-sign a Shortcut, you can use the new Shortcuts command-line tool”. “Shortcuts has full support for AppleScripts and Shell Scripting”. Not dead yet! “Shortcuts is the future of Mac automation”. Taken in isolation; it’s a scary implication the other technologies are destined for the bin. But in context, they’re talking speficially about replacing Automator. “There’s a Shortcuts command-line tool which lets you list and run Shortcuts in your Shell Scripts or command-line tools”. “If you develop an app or a script that would benefit from the ability to run Shortcuts, you should use the Scripting interface. By communicating with the “Shortcuts Events” process, your app can get a list of shortcuts that the user has set up, as well as start running one. In AppleScript, you can accomplish this by telling the “Shortcuts Events” process to run a shortcut by name”: tell application "Shortcuts Events" run the shortcut named "Make GIF" end tell “Finally, macOS Monterey also includes a command-line tool that can list shortcuts and run them by name. If you have command-line tools or scripts, they can integrate with Shortcuts via this interface”. OVERVIEW: Command-line utility for running shortcuts. USAGE: shortcuts <command> OPTIONS: -h, --help Show help information. SUBCOMMANDS: run Run a shortcut. list List your shortcuts. view View a shortcut in Shortcuts. sign Sign a shortcut file. See 'shortcuts help <subcommand>' for detailed help. Edited June 16, 2021 by vitor Vero, dfay, iandol and 2 others 5 Link to comment
dfay Posted June 8, 2021 Share Posted June 8, 2021 I worry about losing the scripting languages…. Link to comment
vitor Posted June 8, 2021 Author Share Posted June 8, 2021 Updated the top post with information from the session. There are quotes with links to timestamps, how to call Shortcuts from AppleScript, and the help form the command-line tool. For Alfred Workflow developers, the beginning and end are the most interesting; the middle is how to build update an app to support a Shortcut. Link to comment
dfay Posted June 15, 2021 Share Posted June 15, 2021 https://forums.macrumors.com/threads/are-the-scripting-languages-still-here.2300956/ short answer again is yes, but…. Link to comment
dfay Posted June 16, 2021 Share Posted June 16, 2021 (edited) https://forums.macrumors.com/threads/macos-12-all-the-little-things.2299706/page-5?post=30019997#post-30019997 > PHP is completely removed. Edited June 16, 2021 by dfay vitor 1 Link to comment
vitor Posted June 16, 2021 Author Share Posted June 16, 2021 (edited) 5 hours ago, dfay said: https://forums.macrumors.com/threads/macos-12-all-the-little-things.2299706/page-5?post=30019997#post-30019997 > PHP is completely removed. And corroborated by a Developer Tools Engineer. Versions of Python, Perl, and Ruby are the same as in Big Sur. Edited June 16, 2021 by vitor Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now