Are there ways to update an existing PlugIn‘s plist in a dynamic way without reinstalling the PlugIn every time?

Hello Folks

Especially hello to @DanThomas, @ComplexPoint, @tiffle, @martin, @corcules & @iampariah

This topic might not be for everyone here - only for those who have tinkered with developing their own custom PlugIns for Keyboard Maestro.

Even though I’ve tagged some here where I think they have developed custom PlugIns and shared them here in this Forum‘s Category maybe there are some missing.

My question is:

Is there eventually a way to update an existing PlugIn‘s Action Plist without reinstalling the action every time it is updated ?

I am currently tinkering with my thoughts on the development of some custom PlugIns for some Applications and Services that use API’s. But here is the thing - let’s say I build an Action that allows me to create an album in the Photos Application that has to be nested into an existing one (Folder ---> New Album) and can move selected photos from the Finder to this newly created Album and this action should also have the setting to choose from existing Albums based on an existing Photoslibrary where the next time I need the action this albums ID is selectable to upturn into a Keyboard Maestro Variable ? Or I use this action to create a new Album in a New Folder inside a new Library. Same should be accessible from the action whenever I need it the next time?

It should also be accessible from the action if I do it in the Photos Application without any scripting.

This is only one of many examples - but maybe you get it for what I am after … perhaps I’ll have to think about something like a scripted routine that does the updates on the plist. Maybe I have to tinker with something like SQLite, too to achieve something like that ?

Please note that my preferred language I want to use for my PlugIn ideas is AppleScript / AppleScript Objective-C because my knowledge is bigger for these as of others.

Greetings from Germany

Tobias (aka @Nr.5-need_input)

Assuming you actually can change the plist, I don't believe that KM will reload it. I suppose it might, if you stopped and restarted the engine.

But why not pass whatever needs to change into the plugin as a parameter? If you answered this in your post, forgive my having missed it while skimming the question. It's time for breakfast and I'm in a hurry to go eat. :slight_smile:

Hello and good morning Dan :wave:

Thanks for your quick reply before doing some breakfast… I assume reloading of Keyboard Maestro‘s Engine would be the easiest part if the little one liners you shared here are doing its job without shutting it down.

The whole thing would be one PlugIn that has a configuration for new entries which would then be used to add as on my example to the Photos Application and then put into the plist for this action with the corresponding ID‘s so that I can when ever needed use the same action with another configuration to retrieve this new entry from the drop-down of the configuration and put it for example into a Keyboard Maestro Variable.

But maybe I decide to make more than one action for this - we‘ll see.

The not so easy thing is the part for the code that is able to see the updates for the various specific parameters and their options which will then update the plist accordingly to any changes.

Maybe I’ve to put all together into an onetime executable Applet for installing the stuff that’s needed including the Action(s) and for the purposes of deinstalling the stuff as well - that has to stay in the Applications Folder so that everything works.

This all is very new to me especially when it comes to the dynamic thing… that is the main reason why I created this topic. There are maybe many ways doing something like this but which one of them will be the one with the most less work to put into ?

When ever you’re reading this reply - I hope you had a great breakfast :waffle:


Greetings from Germany


Personally, I don't think a plugin is the way to go. I'd just make it one or more macros or subroutines. Much easier to deal with.

You mentioned an applet. If what you're doing is more suited for AS, then go ahead and use AS. You can still call it from KM if you want, so it doesn't have to be an applet if you don't want it to. Personally, I find KM to be an excellent platform for running all sorts of scripts. In my case they're usually JXA, but that doesn't really matter.