Archive for the ‘Tips’ Category

Automatically prepending dates to the names of saved files

Wednesday, September 9th, 2020

So a Default Folder X user just emailed and asked this:

I have been a Mac user for 30 years and would love to find a tool that allows me to click a button (or make this the default filename) while in the “Save…” dialog box that will prepend a formatted date to the beginning of the filename. like so:

2020-09-08 Filename.ext

Now, you can set up an AppleScript to do this using Default Folder X’s GetSaveName and SetSaveName verbs. However, that would require that you run the AppleScript whenever you want the date prepended, which is a bit of a pain if you want all of your filenames formatted this way. But I realized as I was replying that you can actually automate this by using (or rather, slightly abusing) an existing feature in Default Folder X.

Default Folder X has the ability to run an AppleScript to determine the location of an application’s default folder. The script will be run whenever a new file dialog is displayed by an application, which is the perfect time to do our little filename modification. So I wrote an AppleScript that looks like this:

on getDefaultFolder(appName, dialogType, firstTime)

  -- only do this for save dialogs
  if dialogType is "save" then

    -- get the current date
    set dateObj to (current date)

    -- then format it as YYYY-MM-DD
    set theMonth to text -1 thru -2 of ("0" & (month of dateObj as number))
    set theDay to text -1 thru -2 of ("0" & day of dateObj)
    set theYear to year of dateObj
    set dateStamp to "" & theYear & "-" & theMonth & "-" & theDay

    -- then prepend that to the name in the save dialog
    tell application "Default Folder X"
      set theName to GetSaveName
      set theName to dateStamp & " " & theName
      SetSaveName theName
    end tell
  end if

  -- finally, don't give Default Folder X a default
  -- folder, so it just continues on normally 
  return ""
end getDefaultFolder

If you save this script in a file named “GetDefaultFolder.scpt” in this location:

~/Library/Application Support/com.stclairsoft.DefaultFolderX5/Scripts/

It will magically prepend the date in the format ‘2020-09-15’ to the beginning of all of your filenames in Save As dialogs. Note that you can still edit the name afterwards if the default filename (like “Untitled 4”) needs to be modified.

Jettison 1.8.1 fixes what broke in version 1.8

Wednesday, September 9th, 2020

Well, Jettison 1.8 didn’t go quite as planned. It adopted a different system API to get power notifications so that it could better handle “dark wake” events, where macOS wakes up briefly to perform backups and network maintenance while it’s sleeping. While the dark wake stuff all worked as expected, it ended up causing issues with some external drives not getting ejected before sleep because sleep notifications were delivered slightly later in the going-to-sleep sequence. It didn’t make a difference on test machines here or with our beta testers, but impacted some users out in the real world once version 1.8 was released. If you’re one of those folks, I’m sorry for the trouble 🙁

Version 1.8.1 was released today, and takes a hybrid approach, using both the old and new API’s to ensure that it gets sleep notifications as early as possible. This restores the reliability of Jettison’s eject-on-sleep capabilities.

This release also allows you to turn off the feature introduced in version 1.8 that quits Music, iTunes and Photos before sleep (to allow ejection of external media containing music and photo libraries). Apparently iTunes doesn’t correctly return to the same location in audiobooks when Jettison relaunches it after waking up, which can be really annoying. So you can disable the feature by using this command in Terminal:

defaults write com.stclairsoft.Jettison leaveAppsRunning 1

As usual, full release notes and download links are on the Jettison release page.

App Tamer 2.5.2 supports Big Sur and Do Not Disturb, gives insight into background processes

Tuesday, July 14th, 2020

Version 2.5.2 of App Tamer is now available. It smooths out a few rough edges on Big Sur. It also respects the Do Not Disturb setting in Notification Center when it comes to warning you about apps using too much CPU.

Of interest to the curious: This release offers a new “Get Info” icon in the settings popup for many macOS system processes like WindowServer, trustd, iconservicesagent and bluetoothd.

Clicking the icon will show a system-supplied description of the process, which may help you understand what that process does, why it might be using a lot of CPU, and whether it’s safe to slow it down. Or it might not, since some of the descriptions themselves are pretty cryptic. Please remember that this information is supplied by the system, not by App Tamer, so I probably can’t help explain what an “SDP transaction” is 🙂

App Tamer 2.5.2 also contains a few bug fixes and some changes in terminology that make it clearer which processes are displayed in App Tamer’s process lists. Full details and download links are on the App Tamer release page.

Adding Default Folder X’s buttons to Path Finder’s toolbar

Tuesday, June 23rd, 2020

Default Folder X can automatically add buttons to the toolbar in all Finder windows so that you can quickly get to its menus or drawer. I’ve had a number of inquiries from folks that use Path Finder as a replacement for the Finder, and they want those same buttons in their Path Finder toolbars.

Unfortunately, Default Folder X can’t automate this, so you’ll need to add the buttons manually. Here’s how to do it in Path Finder 9:

  • Locate the Default Folder X application in your Applications folder and Control-click on it. Choose “Show Package Contents” from the menu.
  • When the window shows the contents of the Default Folder X application, double-click on the Contents folder, and then within that double-click on the Resources folder.
  • Control-click on Path Finder’s toolbar and choose “Add Custom Items…”
  • Use Default Folder X’s Finder-click feature to go to the Resources folder you just opened in the second step.
  • Choose the “DFX” application to add to Path Finder’s toolbar.
  • Repeat the “Add Custom Items…” command and add the “DFX Drawer” application as well.

App Tamer 2.5.1 adds more AppleScript support, fixes issues

Monday, May 18th, 2020

Version 2.5.1 of App Tamer is available now. Among other things, it includes fixes for a couple of complaints with the “using too much CPU” notifications that App Tamer puts up when a process is – you guessed it – using too much CPU. It will no longer notify you if you’ve already throttled an app, even if the app is still over the warning threshold. It also provides a method of making the “Let it continue” button suppress the high-CPU notifications for longer. The default is now 10 minutes (instead of 5) before you see another warning, and you can change that by using this command in Terminal:

defaults write com.stclairsoft.AppTamer notificationMuteTime XXX

where XXX is is the number of seconds to silence notifications.

And for those folks that want to automate control of their apps, a new “manage” verb in App Tamer’s AppleScript dictionary lets you create scripts so you can change settings on a schedule, change an app’s settings with a keyboard shortcut, or something AppleScript-y like that. Here’s an example:

tell application "App Tamer"
manage "Safari" slow yes slowCPU 2 hide yes hideDelay 10
end tell

That will slow Safari to 2% CPU usage when it’s in the background and will hide it after it’s been idle for 10 minutes. To see all of the options, open App Tamer’s dictionary in Script Editor.

This scripting ability is being used by some users to change settings for backups so they run with different CPU limits at night vs. during the day, and throttling background apps more aggressively during video calls. As they say, the possibilities are endless!

App Tamer 2.5.1 also includes a number of fixes for infrequently encountered bugs, such as incorrect behavior when the stats update frequency is set to “never”, and processes not appearing when they’re run from the Terminal using ‘sudo’ or ‘su’.

For a full list of changes and download links, visit the App Tamer release page.

Default Folder X 5.4.5 sorts menus on the fly, fixes performance issues and bugs

Monday, April 20th, 2020

Version 5.4.5 of Default Folder X is now available to enhance your Open and Save dialogs even more. Default Folder X has always provided hierarchical menus that let you very quickly navigate to a folder or file you want, but sometimes those menus aren’t sorted the way you want them. To switch between sort-by-name and sort-by-date, just hold down the Option key before mousing over a menu or submenu – that can make it much faster to find what you’re looking for.

This release also addresses some performance issues if you’re using ARCHICAD or if you’re using screen-sharing while working from home. And there are bug-fixes, including a fairly common one for folks who access files on a NAS or server.

For full release notes and download links, visit the Default Folder X Release page.

An Excellent Introduction to App Tamer on Podfeet Podcasts

Friday, December 6th, 2019

If you’re interested in App Tamer, Podfeet Podcasts just posted a great write-up about it. The article goes into more depth than our own App Tamer pages, and is a great introduction to its features and why you’d want them. It’s a few minutes’ read, and I highly recommend it if you’re interested in getting the CPU usage of your Mac under control!

Get 25% Off for Black Friday!

Friday, November 29th, 2019

Get 25% off all of our products during the Black Friday / Cyber Monday weekend! That includes Default Folder X, App Tamer, HistoryHound and Jettison. If you already own what you want, get gift licenses for friends and family to make their Mac-lives easier!

Just go to our web store and use the coupon code BLACKFRIDAY2019 when you check out.

Default Folder X 5.4.1: fixes for Catalina and more

Monday, October 21st, 2019

Default Folder X 5.4.1 is now available. It fixes several issues that have been reported with macOS Catalina. A couple were simple bugs in Default Folder X itself:

  • Empty folders were not added to the Recent Folders menu
  • Items in the Utility menu were sometimes not enabled correctly
  • File dialog menu shortcuts were not working as advertised

Those issues have all been fixed. One other fix, however, is a bit bizarre. I figured I’d briefly talk about it in case other Mac users or developers encounter this:

In Catalina, the Finder must be running before you can approve apps to record the screen

In macOS 10.15, Default Folder X requests permission for Screen Recording (here’s why). If it doesn’t have permission, it tries to capture a portion of the screen, which causes Catalina to pop up an alert asking for your approval. Default Folder X then leads you through System Preferences to ok everything. It’s an annoying process, but works as well as can be expected given Catalina’s limitations. UNLESS you happen to also be a user of CocoaTech’s Path Finder app.

If you’re running Path Finder and have chosen to have Path Finder launch when you log in and have its preference set to quit the Finder after it launches, you’re in for a treat. If an app needs permission to record your screen, you will never see the prompt, and the app will not be added to System Preferences > Security & Privacy > Privacy > Screen Recording, so there’s no way for you to manually approve it there if you happen to realize it needs permission.

Based on testing that I and Ben Surtees at Surtees Studios (developer of the excellent Bartender app) have done, if the Finder isn’t running, the permissions system for Screen Recording just silently fails. Default Folder X, Bartender or whatever app needs permission doesn’t know this, and will continue prompting you to authorize them in System Preferences. Unfortunately, you have no way of approving them because there’s no way to manually add apps to the Screen Recording privacy panel, and if the Finder’s not running, the system doesn’t automatically add apps as it should.

As a developer, this seems pretty arbitrary – why would we need to have the Finder running in order to get permission for Screen Recording? But there you go – if you’re running into this, now you know why. As of version 5.4.1, Default Folder X will launch the Finder when necessary (and quit it afterwards) if it runs into this scenario. It’s a bit of a comical workaround, but hey, it gets you up and running without further pain.

Oh, and here are the details and download links for Default Folder X 5.4.1 🙂

Go64 1.0.3: More help weeding out 32-bit apps that won’t work in Catalina

Friday, July 26th, 2019

Go64 1.0.3 is available now – you can download it from the Go64 page. If you’re not already aware of it, Go64 is a free application that scans your Mac for 32-bit applications that will no longer work when you upgrade to macOS 10.15 Catalina.

The new version of Go64 will now show you Preference Panes that contain 32-bit code. It also properly skips apps that are built for non-macOS platforms even if they contain code to run on an Intel processor (this is for you, iOS developers).

Most importantly, however, version 1.0.3 provides a preference window where you can tell Go64 not to show apps that are located within specific folders.

In the image above, I’ve got an old copy of Microsoft Database Daemon selected – it’s part of Microsoft Office 2011, which I still have so I can test it with Default Folder X. I know it’s 32-bit but want to keep it around, yet I don’t want it shown in Go64’s search results.

To remove it from the results, I just drag the ‘Microsoft Office 2011’ folder shown in the path control (in the green square) to the ‘ignore list’ in the prefs window. That’ll remove it from the results quickly and easily, even though Office 2011 is still on my Mac.

This should make it easier to clean out your list of 32-bit only apps so you can focus on the ones you need to upgrade. Note that you can also drag a single app into the ‘ignore list’ if you just want to remove one app rather than all apps within a folder.