Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wish every acquisition improved the end product as much as Workflow's did. All Apple's OSes got better for embracing it. I can write and have written AppleScript things, but Shortcuts is a vastly more convenient UX for the things it's good at.


I think the crucial different is Workflow was targeted at what Apple should have been doing from the start. I see it the same way Karabiner, BarTender or QuickSilver (DropBox?) improve the OS experience in ways the platform owner would ideally could have figured out on their own.

Those fundamentally tend to butt against the OS limitations and benefit from becoming a blessed first party utility or feature.


Bartender sold to some sketchy company. We’ve all been moving to the open source Ice app now.


What do you use it for?


Let's see, I have 157 shortcuts defined at the moment. That wasn't due to some mass effort, just a bunch of little things that accumulated over time.

I have one shortcut that shares the song I'm currently listening to in Apple Music to Mastodon. I use iA Writer for my work notes, and another shortcut creates a new note with today's date with wiki links to yesterday's and tomorrow's notes. (I use that one with Keyboard Maestro: if I'm in iA Writer and press F2, it opens that note (or creates it if it didn't already exist)). One runs on a cron job and copies any new links I've added to GoodLinks to my Pocket account so that it'll sync to my Kobo. Here's one that runs a custom sorting script on my OmniFocus projects. This one dims my office lights; I use Keyboard Maestro (again) to link it to one of the buttons on my Stream Deck.

Basically, for me it's the equivalent of shell scripting for GUI apps. I wouldn't want to write a whole app with it, but for quick and dirty automation jobs it's terrific.


I have tons that solve small annoyances or paper over things I forget. As an example, I listen to an audiobook in audible many nights to sleep, but I often forget to set the sleep timer. Very annoying to have to scrub back hours to find the last thing you remember. I have a shortcut that activates when my iphone is in sleep focus that automatically sets the audible sleep timer for me. It's a little thing, but it's a great quality of life improvement and eliminates my need to think about sleep timers.


Some of my favorite Shortcuts do things like:

- toggle the white point setting on or off to warm and dim the display for nighttime,

- present a menu that makes and displays QR codes for my contact (from vCard text), Wifi info, and more,

- turn off Wifi and cellular at the same time (this one's on my homescreen),

- upload a .torrent file to qBittorrent's watch folder via SSH.

I use Shortcuts at work, too, like sharing a Wifi network with visitors - easier than fiddling with settings and they can take a picture of the QR code to share with others in their party.

My favorite and most handy Shortcut took a picture of an order form, OCRed it, applied a regex to find the order #, and finally showed a QR code I could scan with my scanner; This was at a job where customers would come to pick up, and would often have their order email on their phone or as a printout. The Shortcut meant I could snap the photo first thing and then chit-chat in the time it took the Shortcut to run, instead of them passing their phone to me or reading out the number.

Shortcuts is one of the things that keeps me on iOS.


> turn off Wifi and cellular at the same time (this one's on my homescreen)

Out of curiosity - how is this different from enabling Airplane Mode?


Airplane mode leaves WiFi on.


Not on my 13 mini w/ iOS 18.1, and I don’t remember WiFi ever staying on when enabling airplane mode.

Weird that it seems to be different for different people, though.


According to an help article by Apple [1], if you activate wifi or bluetooth during airplane mode, it will remember that and not disable those when you use airplane mode again. I was also surprised reading your comment as for my phone wifi and bluetooth stay on during airplane mode. I must've activated them once and then it just stayed like that ever since.

[1] https://support.apple.com/en-my/guide/iphone/iphb771143ee/io...


I've got a few handy Shortcuts.

• Turn off a particular smart plug

I use this in an automation that runs on my iPad. That automation is set to run when the battery charge goes above 80%.

My iPad charger is plugged into that smart plug, so this effectively gives me the 80% charge limit option that so far Apple has only added to the settings for iPhone 15 and 16, iPad Pro (M4), and iPad Air (M2). My iPad is a plain iPad.

• A series of shortcuts to control my Denon A/V receiver.

My receiver is from 2012, long before voice control was available. It does have network control (and serial port control). I've got a script on an RPi that can use the network control to change inputs, mute/unmute, and change the volume.

I've got shortcuts for mute, unmute, various volume levels, and getting the current settings for input, mute, and volume. They work by using the Shortcut action "Run script over SSH" to invoke the script on the RPi.

I've got an Amazon Echo Dot next to the Denon, with the line out of the Dot connection to one of the Denon analog inputs. When line out is connected to a Dot the internal speaker is disabled, which makes that Dot useless for things like checking the weather or timers unless the corresponding Denon input is selected, so I've got the mic on the Dot disabled and use an Echo Show in the same room for all those things. The Dot's job is strictly to supply input to the Denon.

So let's say I want to listen to some music. I can say "<Apple>, Denon Dot" to switch the input to the Dot. (I'm writing "<Apple>" instead of Apple's phrase to trigger their voice assistant so if anyone ever happens to run this through text to speech it will be less annoying. Similar for Amazon's voice assistant).

Then I can say "<Amazon>, on Dot listen to Classical KING FM on Dot" and the echo Show will start the Dot streaming KING FM to the Denon. (It is only actually necessary to say "on Dot" once, but which of the two is necessary occasionally changes, and it is easier to just say it twice).

• Open the "OTP Auth" app.

That's the app I use for TOTP codes on my iPhone. It supports Apple Watch, but asking Apple's voice assistant on the watch to "open OTP Auth" isn't reliable (maybe...[1]). My first choice alternative to voice would be a widget in the Smart Stack but OTP Auth does not have one.

Shortcuts can be put in the Smart Stack. Hence, a Shortcut on the watch that simply launches OTP Auth.

[1] I say maybe because that is based on my old Series 4 watch. I recently upgraded to a Series 10. That has on-device Siri, and I've noticed that is way better. It did not occur to me to check of "open OTP Auth" is reliable.


As a fellow 2012 Denon owner (AVR 3313) you can probably remove the RPi and just use HTTP. Just use devtools on your browser to do an action in the web UI and see what request it sends, then replicate it in shortcuts.

And there's a internet radio capability built in - you have to pay $20 or so a year for it but it should be easy enough to set up a competing service since it uses unencrypted HTTP - probably just a matter of reimplementing the protocol and then DNS redirect.


What I originally wanted was just a better web interface. Mine is an AVR 1913, and the web page served by the receiver is kind of slow. The shortcuts came later.

I did indeed look at the requests the browser made when on the receiver's web pages. I also used packet sniffing to see what the Denon app on my phone did.

I then wrote a simple web page that just showed current status, and had big buttons for the three sources I use, and for mute/unmute, and for several volume levels, and used JavaScript on that page to send requests to the receiver.

That's when I learned about CORS. The receiver does not send CORS headers, and browsers take that to mean that scripts running on pages that do not come from the receiver should be blocked from receiving any data back.

For the commands to change source, mute, and volume that was OK. They are simple GET requests with the change as query parameters. They could be done without triggering a CORS preflight check. Whether or not the browser blocked the response didn't matter.

Not so for getting status.

That's when I switched the approach from the web page using JavaScript to talk to the receiver to having it be a form and having the web server talk to the receiver. The web page source looked like this:

  <?php
     ...a bunch of functions to control the receiver

     ...code to process the form and invoke those functions
  ?>
  ...the HTML for the web page
Later when I realized being able to control the receiver from shortcuts would be nice, it was a simple matter to copy the web page source, delete the HTML, replace the form processing with command line processing, and have a command line script for controlling the receiver, and then use the run script via ssh shortcut action to invoke it. It never even occurred to me to consider issuing the commands directly to the receiver from the shortcut.

I just gave it a try, using the "Get Contents of URL" action to GET the URL http://ip_of_receiver/goform/formMainZone_MainZoneXml.xml and it worked. It gives back a blob of XML that includes the data I care about (source, mute, volume).

On my Mac I'd probably handle that by passing the XML off to a script to extract that data. I'm not sure how I'd do it on an iPhone or iPad.

There are commands to get individual data items such as the volume whose results might be easier to deal with, but I'm not sure they can be used from shortcuts. They are POST requests to /appCommand.xml, with the command (or commands if you want to batch commands) in XML in the body. For example to get the volume you post

  <?xml version="1.0" encoding="utf-8"?>
  <tx>
    <cmd id="1">GetVolumeLevel</cmd>
  </tx>
The "Get Contents of URL" action does support POST, but the only options it gives for the post data are JSON, Form, and File. For JSON and Form you give it name/type/value triplets and have no direct control of how the post data is formatted. Maybe file would work to get the XML the receiver wants sent but it probably won't have the right content type. I have no idea if the receiver would be OK with that.


Shortcuts is pretty hard to use but it is possible to POST. Here's one of my shortcuts https://www.icloud.com/shortcuts/81229c80b3ec4c32bec866e2b8f...


Interesting. The commands that I caught in my packet sniffing were POSTing text/xml content with the body an XML representation of the commands.

Looks like I missed a more normal form interface.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: