Skip to content

macOS Apps

Articles about OS X applications.

How to securely hide worksheet(s) in an Excel workbook

Important note: Please see the comments—the method I discuss here is secure from casual users. However, the Excel files are just zipped XML files, so it's possible to unzip them and open them with a text editor. When I tested with my dummy salary worksheet, I could see individual salary values, but no actual text—so there wasn't any way to associate a salary with a person. Still, the following should be considered as only a semi-safe solution.

My wife wants to create a budget spreadsheet for the various departments in her company to use. Each department would have their own tab, showing their planned yearly budget by month for the coming year. A super-simplified and unrealistic input worksheet might look like this:

The green areas are the portions that the users would fill out—probably not the department heads, but just someone in the department. Which leads to the problem: There's a worksheet called Salary Info that's used to populate the Salaries line in the workbook. (In my silly example, I just divided the total salary into four equal quarters.)

The problem is that the Salary Info worksheet contains salary information for the entire organization, and this isn't information that should be shared with everyone.The Salary Info sheet might reveal, for instance, that a coworker is leaving in three months—the coworker has told management, but the employee isn't ready to tell the entire company just yet.

So how can you distribute the workbook to all the departments, with the salary info intact, but without revealing that data to everyone?

[continue reading…]



See exactly when an app launched

Update: I guess I should have searched here before I posted this—I wrote up another solution a few years ago, and that one includes a Keyboard Maestro implementation. Whoops! As this one's another method, though, I'll leave it up.

I was working on some stuff for our upcoming Usher 2 release, and needed to know how long Usher had been running. A quick web search found this post, where one of the comments had an answer that works well in macOS:

ps -p pid -o lstart=

Replace pid with the process ID (PID) from ps -ax for the app or process in question, and you're done. But it's possible to make it even easier to use by automating the task of getting the process ID. Here's what I came up with:

ps -p `ps ax | grep [U]sher$ | cut -c 1-5` -o lstart=

The bit between the backticks gets the matching process line from ps, then uses cut to keep just the first five columns, which contain the PID.1When the shell encounters backticks, it processes the commands within those backticks before processing the rest of the command—in this case, the backticked command returns the PID.

[continue reading…]



The 2020 edition of my Excel run tracking workbook

At the end of 2016, I first posted about my run tracking Excel workbook. That first version was crude, but functional, and I used it to track every mile of my "2,016 miles in 2016" running goal. I posted a minor revision for 2017, then made some major updates for 2018. When 2019 rolled around, I made a few more changes, which I released by way of a note added to the 2018 post.

Now that 2020 is here—I know, it's a bit past January, sorry!—I've made yet more changes, and have decided it's time to replace both of the previous posts with one new all-in-one post. Here you'll find a link to the latest version of the workbook, as well as full instructions on how to use it.

[continue reading…]



Quickly create a nested folder structure via Terminal

Have you ever needed to create an empty folder structure with many levels of repetitively-named folders? This doesn't happen a lot, obviously, but if you try using Finder for this task, you'll quickly discover it's really tedious. But a quick trip to Terminal makes the task very fast, and it's not overly complicated.

Let's say you need a folder structure to handle reports that you'll be receiving weekly, but need to keep track of over both quarters and years. One way to handle that would be with a folder structure like this:

(Hopefully obviously, the same structure repeats within each separate year's folder.) Creating that many multi-leveled folders in Finder would be time consuming and tedious. But in Terminal, you can create the entire structure with just one command:

mkdir -p 202{0..5}/qtr{1..4}/week{1..13}

That command takes under a second on my iMac to create the entire directory structure (over 330 folders). Zoom! So how does this work?

[continue reading…]



Add metadata to ripped movies and TV shows

Somewhat regularly, I write about ripping DVDs and Blu-Rays. I tend to prefer physical media and sometimes—especially when buying an older TV series or classic movie—the disc won't include a digital copy. So I rip the disc—this way for Blu-Rays, or just via HandBrake for DVDs—to create my own digital copy.

Once ripped, the problem is that I have a video file that will play, but that has no useful information about what the video is—no metadata about the cast, production year, or (for TV series) season and episode. If I try to add the movie to the TV app (or iTunes, as on my iMac), it will require some hand editing to wind up in the right category, and it still won't have any show information.

Enter Subler, a free app to help you "tag" (add metadata to) movies and TV shows. There are probably other apps out there that do this, but Subler works quite well for me, especially for TV shows.

When I rip a TV series, I'll give the files a filename based on its title and (for TV series) season and episode, like Wings S01E01, or Sports Night S02E04. I then drag and drop the ripped file onto Subler's dock icon, and it opens a window, showing all the metadata associated with the file; here's how the window looked after I ripped the first episode of Sports Night:

[continue reading…]



Remove the macOS Catalina guilt trip from macOS Mojave

May 26 2020 Update: The 2020-003 Security Update for Mojave will reset the red flag (and deprecate the command used to ignore the update). However, these steps do still work, so you just have to repeat Miles' solution again. And after you do, do not open the Software Update panel, or the red badge will return. (But if it does, just run the commands yet again.)

May 9 2020 Update: Commenter Miles Wolbe has come up with a much better solution. Ignore everything in this tip, and just run this Terminal command:

sudo softwareupdate --ignore "macOS Catalina" && defaults delete com.apple.preferences.softwareupdate LatestMajorOSSeenByUserBundleIdentifier && softwareupdate --list

If you're interested in why this works, Miles explains it in more detail. I've tested this method, and it works—no more agent required!

I have no plans to move my main iMac to macOS Catalina, at least for the forseeable future. There are two key apps I use—Fujitsu's ScanSnap scanner software and the Many Tricks' accounting app—that are both 32-bit. In addition, there are changes in Catalina relative to permissions that make it somewhat Vista like and slow down my interaction with the system. (My MacBook Air is my "production" Catalina Mac, and I have an older retina MacBook Pro that I use for Catalina betas.)

But Apple really wants people to update to Catalina, so they let you know about Catalina…constantly, it seems. In System Preferences > Software Update, you'll see this…

[continue reading…]



How to display the size of an app’s frontmost window

A user asked me a question about Moom

Say I’ve resized a window to the dimensions I want. Is there a way to figure out what these are so I can create a resize action in Moom?

Basically, the user wants to save a window size as a custom action, to make it easy to reapply that action to any window. (If it were just one window in one app, you could use Moom's Save Window Layout feature to save that layout for easy recall.)

There is a way to see this info in Moom, but it requires enabling our debug log and digging through a bunch of output. As an easier alternative, I was certain that AppleScript could do this; I fiddled a bit on my own, and did some web searching, which led me to this thorough post on StackExchange.

Using the very first bit of the first script there, I came up with this version:

Run the above, assuming Safari is running and has an open window, and you'll see this system notification:

Change Safari to whichever app you're interested in, re-run the script, and you'll have that app's window dimensions. This script is incredibly basic (no error checking, hardcoded app), but it works1If you see a message about ScriptEditor needing Accessibility access, open System Preferences > Security & Privacy > Privacy, click on Accessibility in the left panel, click the lock icon to unlock the panel, click the plus sign to add an app, and navigate to Script Editor in Applications > Utilities, then click Open..

Of course, me being me, I decided I'd spend a couple hours making it more useful, even though I probably won't use it all that often. So I modified it to work for whichever app is frontmost, and made it run from Keyboard Maestro. I then assigned it a gesture trigger with my mouse, so I can easily see any window's dimensions with a simple mouse movement.

[continue reading…]



How to copy non-visible formula results from Excel

I use Excel for a ton of stuff, both personal and work. As an example, on the work side I use an Excel workbook to track our apps' hidden prefs—which are set using a long ugly Terminal command1Something like this: defaults write com.manytricks.Moom "PMWindowFadingDuration" -float 0.

These hidden prefs can be used to invoke features we're testing, or to revert a behavior we've changed at some point, etc. For example, Moom has hidden prefs to use the full screen grid without clicking in the big box and to disable the fade in/out of the keyboard controller.

We don't publish all of these, as we're not necessarily ready for them to be put to use by everyone (otherwise, they'd be visible prefs). But there are cases when a user has a specific need for a setting, or when troubleshooting, that these hidden prefs can be very useful. As such, I often have to send someone a defaults write command.

Read on to see how I use Excel's formatting features—plus the ever-valuable Keyboard Maestro—to disguise some of this workbook's formula results, yet still easily copy them for sending to a user.

[continue reading…]



How to auto-crop huge images with ImageMagick

In my recent post A new set of Hubble deep space iMac retina desktops, I included a set of auto-cropped 5120x2880 desktops. In that post, I wrote:

These images were automatically cropped from the master image (after I cropped that; more detail on what I did is coming in a follow-up post), via ImageMagick.

So this would be that post: How to auto-crop huge images using ImageMagick. If you're not familiar with it, ImageMagick is a set of command-line tools to manipulate images. There are a number of ways to install ImageMagick, but I used Homebrew (brew install imagemagick).

[continue reading…]



2019 iMac vs Late 2014 iMac—Ripping addendum

In Part 1 of my 2014 vs 2019 iMac comparison articles, I provided an overview and a number of comparison benchmark results. In Part 2, I looked at changes in gaming performance between the two machines.

But there was one more thing I wanted to do: Compare Blu-ray ripping speeds. At the time, though, I didn't have any new movies to rip, and I really didn't want to spend the time re-ripping an existing movie. Now, though, I do have a few new movies to rip, as I'm trying to finish our collection of all the films in the first three phases (now called the Infinity Saga) of the Marvel Cinematic Universe.

That meant buying the films I'd liked the least—The Incredible Hulk and the first two Thor movies. With that came the chance to compare the Blu-ray ripping speed of the two iMacs. I use the method described in my article Revisiting ripping Blu-ray discs, which is this:

  1. Use MakeMKV to create an MKV file on the hard drive that contains the video and audio tracks.
  2. Use Don Melton's Video Transcoding tools to create the final movie from the MKV file.

Using The Incredible Hulk, I timed how long it took to create the MKV file and how long it took to create the finished movie. Without further ado, the results (times are in hh:mm:ss format)…

[continue reading…]