MACRO: [KMFAM] Favorite Actions and Macros v1.4 Released 2021-12-09

@DanThomas, when I click "/" to choose the action and click on the action, I am getting this error and no actions are added:
Screenshot 2023-11-19 at 4.26.25 PM

I'm not exactly sure what you're trying to say, however if you were to tell me that it doesn't work with macros that have a slash in the name, it wouldn't surprise me.

Getting this erro:

KMFAM Macro Installer v1.4

You selected "2024-02-12 06:08:37.773 osascript[19358:237493]
ApplePersistence=NO
/Users/user/Files/KMFAM Installation Files.v1.4/".
This folder doesn't contain the installation files.

The folder we're looking for is most likely named
"KMFAM Installation Files.v1.4".

Press OK to choose a different folder, or Cancel to quit.

Never seen that error before, and I honestly have no clue.

any easy way to export the favorites i've made to give to a friend & he could import them?

Hello @arfan

Sure there is one - download the Export to KM Native Favorites Macro from Dan - it’s linked in the OP above.

This fabulous Macro exports a copy of all your KMFAM Actions into one single Macro where every Action sits in its own collapsed Group Action named like you named them inside KMFAM. From there you can find your own way to export the favorites to give them your friend.

I encourage you to watch the tutorial video for this macro first to see how the whole process is done.

It must be linked in the OP of the Macro if I remember it correctly.

Have a great day and good luck - let us know how it goes - and of course if you have further questions.

Greetings from Germany

Tobias

1 Like

Hello Dan (@DanThomas)

Sorry if I am bumping you for help while you are busy but I need your assistance…

I want to upgrade KMFAM from Version 1.1 and don’t really get it which Version (1.2 or 1.4) I have to choose first - or is the order trivial ?!

I am using KMFAM on every System from Yosemite to Ventura in a VM and on real Machines with High Sierra and Monterey and never ran into issues - let’s say I want to have less more Global Variables to keep tracking of

It would be nice if you could help me with this.

Greetings from Germany

Tobias

I can see how that might be confusing. Just follow the steps for 1.4, and ignore the rest.

I'll probably edit the original post and remove the previous versions.

Hello Dan

Thanks for your reply and thanks again for pointing me into the right version for my needs …

I would say it is better to maybe update the OP with more and clear information that makes it easier for new KMFAM users to choose the right Version demanding on their own purpose…

I like it beeing up to date as much as possible but I like it to have options for some kind of legacy … there comes a little playroom with this …

Thank you so much again .. and have a great day and of course a nice weekend

Greetings from Germany

Tobias

I did. Thanks.

hello @DanThomas,

@griffman recommended your macro today and it is extraordinary. Exactly what I was looking for. I have one problem which I am unable to solve.
I installed your macro as per instructions.
My collection of customized actions has long names containing descriptors and keywords (because there are many possible variants within an action).
This makes the simple KN native insert action window too small to properly read the complete name of my actions and turns it into a tedious guessing game to try to guess the truncated part of the name in the pick list.
With your macro, the names are also truncated in the add action (F15) pick list.

As per @griffman 's suggestion, I tried to edit the size of the HTML window and was unable to resolve the issue of the truncated action name.

I was able to adjust the number of lines of the pick list and the window height to my liking (3 and 4 below), but unable to change the width of neither the pick list nor the total width (1 and 2 below) and was wondering if there is a way to do so.

thank you very much !

Screenshot (click to expand/collapse)

Screenshot (click to expand/collapse)

I'm going to try and tell you what to modify, but you'll have to test it. I may give you wrong info, and if so, let me know what happens and we'll go from there.

First of all, make a copy of your KMFAM Resources folder. If you're not sure where it is, look at the KM variable DND__kmfamResourcesFolderPath.

The folder should look something like this:

Open the file "Select Favorite Action.html" in a text editor.

Look for a section of code that should look something like this - it should start around line # 774:

try {

	var selectData = JSON.parse(getKMVariable("Instance_SelectData", true));
	_actions = selectData.actionsInfo;
	_usageAdapter = new FavoriteActionsUsageAdapterFunc(selectData.usageInfo);

	var options = JSON.parse(getKMVariable("Instance_Options", true));
	_statusLineIsVisible = options.showSelectStatusLine;
	document.getElementById("statusLine").toggleVisibility(_statusLineIsVisible);
	_sortOptionsAdapter = SortOptionsAdapter(options.sortOptions || {});

	_preferencesFolderPath = getKMVariable("Instance_PreferencesFolderPath", true);

	var width = "840";
	document.body.style.width = width + "px";

	var pickListSize = getKMVariable("Local_PickListSize", true);
	document.getElementById("pickList").size = pickListSize;

There's a line that says var width = "840";, which should be around line # 787.

This is the width in number of pixels. Change it to something larger - don't remove the quotes.

See if this works for you. If not, let me know. If you need to, copy back the original file from the backup folder.

Fingers crossed - keep me posted!

1 Like

thank you very much Dan for your prompt and detailed answer.

I edited the select favorite action.html file with Bbedit.

  • I changed the var width to "1100" and the width is now perfect !
  • the right border of the corresponding action is truncated. It's not the end of the world, but is it possible to find a way to preserve it ?

thanks again VERY much !

Screenshot (click to expand/collapse)

Glad that worked!

The image portion shows the image as it was captured. So the wider your KM Editor's macro panel is, the wider the image will be (and visa-versa).

You could change the width of the image pane. In the same file, around line # 64 is this:

#actionImageCell {
	width:485px;
	max-width: 485px;
}

You can change that to wider, but of course that takes away from the size of the pick list on the left.

When I have a macro image that's too wide, and I actually care about it (which is only sometimes), I'll resize the KM Editor's macro panel and capture a new image. The screen that lets you add a new macro also allows you to only update the image, if you want. (I hope that makes sense).

1 Like

This is simple and would be my first choice. I understand about resizing the KM Editor macro panel. Sometimes it works and sometimes not. I also tried the "update image route. "For example the action "comment" is very fickle. Usually too big even after adjusting the macro panel which I made tiny. The actions are squeezed in.
All in all, 99.99999% success and I am extremely grateful.

1 Like

Would there be a way to batch import about 30 of my favorites into KMFAM ? thank you

No. I have code to go from KMFAM to KM's native favorites, but not the other way.

You might consider migrating favorites as you need them. But even if you don't, it doesn't really take that much time. I'd imagine you would get in a rhythm.

2 Likes

you are absolutely right. that's what I will do. Thanks again Dan !

1 Like

Wisdom.

This is the kind of thing I would spend hours on to automate 10 minutes of manual entry :joy:

3 Likes

Oh for sure - me too. Absolutely. LOL.

2 Likes