Framed iPhone screenshots

After reading Jason Snell’s review of Shareshot and Framous, I thought I should start adding frames to my iPhone screenshots again, something I haven’t done for several years. But I didn’t buy either of the apps he reviewed, nor did I download Federico Viticci’s Apple Frames Shortcut. Unsurprisingly, I built my own little system specifically tuned to the way I work using Retrobatch and Keyboard Maestro.

Framed iPhone screenshot

We’ll start with the Retrobatch part. There are two workflows that I’ve saved as droplets to my Applications folder: Frame iPhone and Frame iPhone Half. One creates full-sized images (1320×2720) and the other creates half-sized images (660×1360) from the screenshots I take with my iPhone 16 Pro.

Each workflow uses a transparent PNG image for my Natural Titanium phone, which I downloaded from Apple’s Product Bezels page. Because I thought Apple added a little too much empty space around the frame, I sliced 15 pixels from the left and right sides of Apple’s image and 20 pixels from the top and bottom. This affects a couple of values used in the workflows.

Here’s the workflow for Frame iPhone Half. The Frame iPhone workflow looks the same, except it doesn’t include the Scale action.

Frame iPhone Half workflow

Here are the properties of all the actions:

Round Corners properties

Overlay properties

Scale properties

Write Images properties

If you want to make your own Retrobatch workflows using the Apple’s original PNG, you’ll have to add 15 and 20 to the X and Y offsets in the Overlay action.

The radius I used for the Round Corners action, 180 pixels, doesn’t match the inside radius of the frame perfectly, nor does it have to. It just has make the rounded corners of the screenshot fit under the frame and not “peek out” beyond its outer edges.

If you don’t want to build your Retrobatch workflows from scratch you can download the Frame iPhone Half workflow, adjust it to your needs, and save it as a droplet. Retrobatch workflows are XML files, so clicking the download link may open the file in your browser. If that happens, just come back here and right-click on the link to save it to your computer. You may have to delete an .xml extension from the downloaded file. “Smart” software often does things we don’t want.

So now we have droplets we can drag iPhone screenshots onto to get framed images like the one at the top of the post. But no one wants their Applications folder open all the time, so I built a Keyboard Maestro macro to do what dragging would do. You can download it or build it yourself from this:

KM Frame iPhone Screenshot

Here’s how I use it. After taking the screenshots on my iPhone, I open the Photos app on my Mac and copy the screenshot images to whatever folder I’m using for the assets of the blog post I’m writing. I then select the screenshots I want framed and press ⌃⌥⌘F. This window appears:

KM Frame iPhone Screenshot prompt

I select Original or Half, as appropriate,1 and Keyboard Maestro then opens the screenshot files in the associated droplet—just as if I had dropped the image files onto it. I then have framed images ready to upload to my server.

A couple of notes:


  1. I think I’ll probably change the default to Half, but we’ll see how it goes. 


Direct links to Apple News sections

Yes, the ads are annoying, but I’m coming around to Apple News. And I’ve found it’s better if I don’t have to scroll to get to my favorite sections or channels. Here are a couple of Shortcuts that get me directly to places I like to go in the app when I’m on my phone or iPad. I’ve saved them both to my home screen, so I can get where I want to go with just a tap.

Home screen with News Shortcuts highlighted

Let’s start with Puzzles. Some months ago, I saw either a blog post or a toot on Mastodon that explained a simple way to make this Shortcut. I’d like to credit the person who created it, but I didn’t think I’d be writing about it, so I didn’t take note. Sorry about that, whoever you are.

When I say it’s simple, I’m not kidding. It’s a single step:1

StepActionComment
1 News+ Puzzles Step 01 Open the given URL

The URL in the Open action is

https://apple.news/puzzles

which is a nice, readable URL. And although the “documentation” for Open (it’s just one sentence in the Shortcuts app) says it opens the URL in Safari, it doesn’t. The system is smarter than the people who write the Shortcuts docs, and it knows to open a URL like this in News.

Like all Shortcuts, this one can be activated by an icon on the home screen. To make the icon, follow Apple’s directions, which are, thankfully, more complete than the info on the Open action.

More recently, I wanted a similar way to go directly to the Scientific American channel in News. I copied the Puzzles Shortcut and tried changing the URL to something equally nice, like

https://apple.news/scientificamerican

or

https://apple.news/sciam

but none of these nice URLs worked. So I went to the SciAm channel in News, tapped on the three-dot menu in the upper right corner, and chose Copy Link from the menu.

Scientific American channel screen with menu

This put the rather unfriendly URL,

https://apple.news/TveHp0EHGTXenwIFMSprU9g

on my clipboard, which I pasted into the Open action, giving me this Shortcut:

StepActionComment
1 News+ SciAm Step 01 Open the given URL

I made a home screen icon for it, too, and it works as expected. The hardest part was choosing a “scientific” icon. I thought there’d be an Ehrlenmeyer flask or microscope icon in the list of choices, but no go. Then I saw the atom icon, which is perfect.

I was a little worried that the unfriendly URL was somehow unique to me, so I asked on Mastodon for others to try it. It seems to work for everyone, even if you don’t follow the SciAm channel. Thanks to Eric Wooten, keven humdrum, and Dr. Juande Santander-Vela for testing it for me.

Obviously, this is a technique you can extend to other parts of the News app. It’s often nice to skip over the political news to get to more pleasant topics.

Update 12 Mar 2025 11:41 AM
James Fee wanted to jump immediately to the Sports section. It wasn’t as easy as finding the link to Scientific American, but he figured it out. The URL is

https://apple.news/TYOpCNr2eTWS1swf0gCKkOQ

He shared it with me, so I’m sharing it with you.


  1. Which is why I’m not bothering to make an iCloud link to the Shortcut. 


A Mac smart quote curiosity

I didn’t turn on the smart quotes feature on any of my Macs until earlier this week. I probably should have, but I didn’t need them when writing blog posts or reports,1 and I did virtually all of my social media posting from my phone, which has had smart quotes turned on for years. Since turning Mac smart quotes on, I’ve noticed they behave differently in different apps, even when the apps all come from Apple. I haven’t seen anyone talk about these differences, so I thought I’d do a quick post on what I’ve learned.

As far as I know, the original smart quotes algorithm was created by David Dunham for his miniWRITER desk accessory way back in the early days of classic Mac OS. Here’s Dunham’s description of the algorithm:

As the user types, the characters typed are automatically replaced, according to the context of the insertion point, before being inserted into the text. A quote is turned into its left equivalent if it is at the beginning of the text, or if it follows a space, tab, return, or left punctuation (‘(,’ ‘[,’ ‘{,’ or ‘<’). A quote is also considered an opening quote if it follows an opening quote of the opposite type (as in: “‘sorry’ is all you have to say?” she asked).

Every other quotation mark becomes its right equivalent.

Despite its simplicity, this is a remarkably robust algorithm. The only time I’ve noticed it messing up is when you need an apostrophe at the beginning of a word. If, for example, you’re typing out A Visit from St. Nicholas, what should be

’Twas the night before Christmas…

turns into

‘Twas the night before Christmas…

Fortunately, apostrophes like this are uncommon in modern writing. ’Tisn’t very likely you’ll see this unless you do a lot of dialect writing.

Here’s how Apple’s smart quotes work in a few different apps:

Pages
Here, smart quotes do exactly what you’d expect. As soon as you type either ' or ", you’ll see the appropriate curly version appear on the screen.

TextEdit
Things are almost the same in TextEdit, but not quite. As you type, you’ll see the straight versions appear momentarily, then be replaced by the curly version a fraction of a second later. The overall effect is the same as in Pages, but the slight delay is noticeable. By the way, smart quotes in Stickies (remember Stickies? it’s still here) works the same way as TextEdit.

Safari
Now we get into something interesting. In a web page’s text field, typing ' or " will put the straight quote on the screen and it won’t become curly until you type something else. If it’s supposed to be an opening quotation mark, the curly version won’t appear until you’ve typed the next character. If it’s supposed to be a closing quotation mark or an apostrophe, the curly version won’t appear until you’ve typed some kind of “ending” character—typically a space, a return, or some kind of punctuation. This is usually not a problem, even though it looks a little weird. But if you end on a closing quote—or you don’t put a space or punctuation character after a contraction—the final quotation mark or apostrophe will never curl. Here’s a demonstration:

If you’re sending a message via Safari (or a web app made from Safari) this lack of curl could make your message look goofy, with a bunch of typographically correct apostrophes and quotation marks finished off with a straight one.

Why do different apps from Apple handle smart quotes in slightly different ways? Maybe because the apps were written at different times by different teams and they didn’t share code because the excessively secretive Apple keeps its teams separate? Or maybe there’s a good reason for them to work differently, but I don’t know what that would be.


  1. Going back to when I used Linux, which didn’t have a system-wide smart quotes setting, I’ve had filters that convert straight quotes and apostrophes to curly ones prior to publishing. 


Bolts in Mathematica

Yesterday’s post included three drawings I made using a combination of Mathematica, Acorn, and OmniGraffle. The roles that Acorn and OmniGraffle played were pretty obvious, but the Mathematica1 part is worth a description.

To get the stylized images of bolts, I combined three things:

  1. A black helix representing the thread peak.
  2. A blue helix representing the thread valley.
  3. A translucent cylinder representing the bolt shank.

The cylinder was easy. There’s a Cylinder function built in to Mathematica. But the helices require a little math.

A helix can be defined through a set of parametric equations:

x = Acos(θ-θ0) y = Bsin(θ-θ0) z = Cθ

where A, B, C, and θ0 are constants that define the geometry of the helix and θ is the single parameter whose value changes as we wind around the helix. This is a more complicated set of equations than are given in MathWorld’s Helix article, but that’s because we need to account for the “handedness” and the starting angles of the threads.

Here’s the Mathematica notebook with all the code needed to produce the drawings:

(The final three drawings in the notebook aren’t being rendered correctly here. I’ll discuss that in a bit.)

The notebook starts by defining the dimensions of a 1″ UNC bolt. The major diameter is 1″, the minor diameter is 0.8647″, and the pitch is 0.125″. These values are turned into the variables ro, ri, and p. We then create the black helix via the ParametricPlot3D function with equations

x = rocosθ y = -rosinθ z = pθ 2π

The negative sign in the equation for y is what makes this helix right-handed instead of left-handed.

The blue helix is built the same way, but from the equations

x = ricos(θ+π) y = -risin(θ+π) z = pθ 2π

Here, we need to include a starting angle of π to insure that the peaks and valleys are 180° apart.

Unfortunately, the graphics in the rest of the embedded notebook above aren’t being rendered properly, even though the code is correct. The translucent cylinder by itself should look like this:

Properly rendered cylinder

The three parts shown together in a perspective view with the bolt in a vertical orientation should look like this:

Properly rendered vertical bolt

And the orthographic view, which is what I used to build the images in yesterday’s post, should look like this:

Properly rendered orthographic view

I don’t know why the embedded view isn’t accounting properly for the AmbientLight directive. The three images above are what I see in my local notebook. The embedded notebook is coming from the Wolfram Cloud, which apparently needs to get some bugs fixed. I’ll have to send in a report.

The orthographic view was arrived at by setting the ViewPoint to {0, ∞, 0}. In other words, we’re looking down the y-axis from an infinite distance. In doing this, all the sight lines become parallel, which is what we need to see the thread alignment without any perspective effects.

After saving the orthographic view as a PNG image, I opened it in Acorn, selected all the white pixels with the Magic Wand tool, and turned them transparent. I then imported two copies of the transparent PNG into OmniGraffle, arranged them so the threads meshed, and added the annotations shown in yesterday’s post.

I suppose I could have done all the drawing in Mathematica, but that would’ve taken more time than just drawing one bolt there and doing all the subsequent manipulations in other apps. I try to choose apps based on what they’re good at.


  1. Although the app on my Mac is now named Wolfram, it’s still called Mathematica in several places within the app and in online seminars run by Wolfram (the company). Thirty-five years of branding are hard to break.