Eject Memory Card after Lightroom Import

Since I have switched to using CF Express memory cards, Lightroom now treats these as independent hard drives (not memory cards) so the automatic 'eject after import' function no longer works.

So I would like to create a macro that will trigger automatically after I have imported my images from my CF Express memory card.

Lightroom will sound an alert noise after import but I know KM can't trigger a macro on sound alert so I am not sure what the best solution is for creating this action.

Any help gratefully received.

David

Hello David (@Printdevil) :wave:

If you have notifications that are notifying you about a successful import you can pause the macro wrapped in an Until Loop using the Scripting Condition with AppleScript to scan the Notification Center for these Notifications.

It is a lot of work getting there but I am quite shure this works for Loghtroom, too.

If there is a detection of such notifications and the Text they contain you can then eject the Card using diskutil (Disk Utility‘s cli tool).

Hope you found this useful.

Greetings from Germany

Tobias

Thanks Tobias,

I don't think Adobe Lightroom works with Notification Center, does this mean your suggestion may not work?

Just so you know, when I import the pictures in Lightroom I can see a progress bar top left that fills up until it disappears then the import process is complete and that is when I would like it to eject the disk.

Hello David

Thanks for your reply…

While I don’t have Adobe Lightroom I can not look any further into it - you just have to go through the Settings and see if there is an option for such type of Notification.

Is there an option to pause/resume the import on the Progressbar window ?!

If yes I would encourage you to pause the next import and try to get around the window using UI Browser.

If you have no setting for the notification then you could develop the same pause until loop with getting this window but this time used in a separate Macro that runs asynchronously to the main Macro routine which will have to be paused until the SubMacro reports that the Progressbar window doesn’t exist any more through a global variable. The execute Macro Action for the SubMacro can be placed anywhere before the pause until action in the main Macro.

By the way - did you know that most adobe tools are also known for their extensive scripting support ?!

I don’t know if Lightroom is scriptable or not - but maybe if that’s the case there are could be commands in the Scripting Dictionary that could help you.

If there is nothing like the things I talked about here - I don’t really know know what can be done to accomplish this task yet … maybe some sort of working with found images (very high pressure on your Mac‘s processors!!) or area capturing and ocr could be done in some sort of way.

That’s all I have in my mind for now … - maybe there is nothing more.

Greetings from Germany

Tobias

If you don’t have UI Browser or have trouble getting it to work properly here is a macro that you could use while Lightroom is your Frontmost Application and the Progressbar window is also showing … maybe the macro shows you that and gives you the appropriate Properties and information to work with.

Greetings from Germany

Tobias

Thanks Tobias, the progress bar is dynamic and changes based on how many files to upload. I'm not familiar with UI Browser so I have written a simple KM macro with an eject disk Apple Script which I have assigned a hot key trigger so I can run from the Finder to eject the disk when I see the import is complete.

Hello David

I’ve written about a little application named Jettison and it’s commands for the usage with AppleScript…..

My post mentioning the Application:

My post about the commands:

This application changes totally the way you use your drives diskimages and sd cards…

Maybe it will help you with all your external media.

Greetings from Germany

Tobias

That's brilliant, thanks Tobias.

I already have Jettison although I wasn't really using it so I uninstalled it. Not sure the script will be configurable to eject the disk after Lightroom has imported my images?

BTW, I have been using Default Folder X since it was created and along with KM that is always the first app I install on a new Mac.

First of all thanks for replying back to me

I’ve posted it here since it could be very useful to you as well as it is to me … because it is really a game changer for handling external media …

That what you call a script is actually no full script … each line is a one liner tell block on its own for the dedicated AppleScript command …

For the other part of your question it actually depends …

I’ve given you suggestions on how you can find out if your import dialog is detected by System Events and and gave you a hint to look for scripting in general - finding out of there are possible commands …

Unless you don’t do that I can’t try to help you out since I don’t have this Application.

I’m sorry but that’s it .. without any information about what I asked you about before there is even no answer to the second part of the question.

Greetings from Germany

Tobias

Thanks Tobias, I am happy with my quick and easy KM shortcut to manually eject the disk when it has finished importing.