Different than how yours is set up, I've long mounted attached volumes with a scheduled AppleScript since I would rather specify the times when Time Machine is run.
set theDisk to "Disk Name"
do shell script "diskutil mount `diskutil list | awk '/ " & theDisk & " / {print $NF}'`"`
After Time Machine runs, another AppleScript unmounts the disk.
set theDisk to "Disk Name"
do shell script "diskutil unmount " & quoted form of ("/Volumes/" & theDisk)`
Hi there, I'm very new to KB Maestro. I just downloaded the submacros and read the yellow notes. Starting with "check if drive is mounted," where does the hard drive name go? Where it says cidmTriggerValue?
Is there a way to eject an SD card? It seems like they are handled differently. I cannot get the eject function to work on an SD card, and I notice a drive ejecting app I have also cannot manage SD cards.
Rally? I've used that for years. What does the Keyboard Maestro error log say?
To clarify, $KMVAR_localCard is the name of your SD card as it appears in the Finder saved as localCard rather than the script reference ($KMVAR_localCard) to it.
Looks good (but looks can be deceiving). Here are a few tricks to try:
Use a Display Text action to display your card name variable surrounded by brackets to make sure there's no extraneous white space. Or just double check the Set Variable action. The name might not match what's in the Finder.
Run my command line with the actual SD card name in Terminal to confirm it works.
Run Disk Utiity to see if the card mounts and ejects there. We're using the command line equivalent.
I ran this in terminal "diskutil quiet unmount "SDCARD" and it did not work... Gonna grab a few SD cards and see if it's something particular to this SDcard...
Update: there was in fact something strange happening with the SD card. I was unable to eject it by any means. MacOS claimed it was in use by another program. I logged out and logged into a user that had no running programs and still couldn't eject it. So I force ejected, logged out. Logged in. Eject started working normally for the card.
Logged back into my normal user and tested the KM settings basically as they were originally written and it worked this time. Thank you to everyone who was gracious enough to help me troubleshoot this. Some kind of weird hopefully one-off issue.
Interestingly, with testing it seems that if an SD card is called "Untitled" the unmount command doesn't work in terminal or KM. I'm guessing that's some kind of safety feature. If I change a card's name to Untitled1 the eject command in terminal and in KM work fine.
*The reason I was hoping to just go with "Untitled" is because I often format my SD cards in the cameras, and the default on every reformat is "Untitled," and I don't really want to rename them all the time. Although, as I type this, I bet I could have KM automatically rename an SD card with name "Untitled"...