Add Ability to Insert 'Favorite Actions' by Name Search Bar

I just found out myself @nikivi, you can limit the search only to the favorites... so this is then somewhat clearer.

1 Like

Yes but there is no dedicated search for 'favorites only', right? The only way is to search all actions (favorites & stock) or go to menu bar as you do in screenshot. I think it might be nice to have a dedicated favorites only search.

1 Like

@nikivi I learned if something doesn't work, it always works with Keyboard Maestro.... even in the Keyboard Maestro app :wink:

I put a "# " in front of my favorites and so I only get them displayed:

2021_11_02_Support_1

05)Select Favorites.kmmacros (3,6 KB)

Image on 2021-11-02 07.30.03 PM

Maybe someone in the forum has a better idea or @peternlewis adds a separate search function in version 10

3 Likes

I like the idea of prefixing custom actions with #. Works out well for me. Thanks. :sparkles:

1 Like

LOVING the addition of favourite actions. Very useful for combining multiple frequent action sets (screenshot of my first use case).

Anyone know if it's possible to rename favourites to keep them organized?

If it's not possible yet, perhaps exposing favourites as a macro group would allow for better organization.

…or simply adding a rename action down where the delete option currently is.

Poor Peter, he gives us fish and we immediately ask for sauce, fries and lemon slices to go with it! His work never stops :laughing:

Thanks for this fantastic addition!

1 Like

Hey Joel,

Prefix your search with “fav” in the search field.

-Chris

Thanks Chris! You mean that as a way to find the favourites, but there isn't a way to rename a favourite yet, right?

@Joel_Rendall unfortunately this is not possible.

1 Like

Hi @appleianer I've adapted your 05)Select Favorites.kmmacros Search Macro with @ccstone's idea of putting "favorite" at the head of the search. It seems to do the same thing without having to give the Favorites a special name or put any special character like a # at the start of the name:

05)Select Favorites.kmmacros (3.0 KB)

image

2 Likes

@Zabobon thanks for the tip, even if I now have to set up my Favorite Actions again without "# " :rofl:

1 Like

It is like gardening. The pleasure is in the journey rather than arriving :rofl: :rofl: :rofl:

2 Likes

Hi @appleianer, I am just wondering if there is a way to adapt your Macro/Workflow further so that a second press of the same hotkey (or gesture) removes the "favorite" or "fav" at the start of the search field and therefore opens the search up to all the inbuilt Actions (as @DanThomas's KMFAM does). I haven't been able to work out how to achieve that yet but I'm sure it's possible.

For example if I searched for a Favorite Action with "Prompt" in its name:

First press of the hotkey would bring up this (as it does already)

image

Second press of the same hotkey removes "favorite" from the head of the search to open up the search to all inbuilt Actions:

image

I know this is something I'd want to do when I finally get the time to do the upgrade and play with things.

@ccstone I think you have KM 10. Can you think of a way to determine if the prompt is being displayed? Maybe some simple AppleScript? Thanks.

1 Like

Doing this with a second Macro (and different hotkey) is quite simple (the below assumes that "fav " has been added to the start of the Search Field and that the search is displayed on screen).

This works:

image

So, I think it's not going to take too much to bolt the two Macros together and do first one thing and then the other with the same key press.

(@DanThomas - it is so good to see that your ideas have been taken onboard and integrated directly into Keyboard Maestro. I have been using KMFAM daily and loving it.)

@Zabobon with the KMFAM macro, the double keystroke was certainly only necessary because the normal actions could not be integrated.

Actually, @peternlewis has thought this through correctly.
With only one shortcut you can access the actions as well as the favorite actions.
Visually, the favorite actions are marked by the :star:.

It is certainly interesting whether your suggestion with the double keystroke (without favorite) can be implemented. However, this would not be necessary for most users.

Yes, that works really well. But if I first search for a Favorite and find it doesn't exist it is useful to be able to hit the same key again to search all Actions. Of course I could just select and delete "fav" manually... :grinning:

1 Like

The thing that makes these new Favorite Actions super-powerful is that they sync between machines (if syncing is turned on) with no new setting needed by the User. Yes, Peter has thought it through very well and kept it nice and simple.

1 Like

So, for what it's worth, the below Macro works to do this:

First press of the hotkey (in my case Alt+A) would bring up this (as it does already). And I have typed "prompt" as what I am searching for. So, I get a search for any of my Favorite Actions that contain the word "prompt":

image

While this search field is still open and still contains "FAV prompt" a second press of the same hotkey (in my case Alt+A) removes "FAV" from the head of the search to open up the search to all inbuilt Actions containing the word "prompt":

image

1 Like

Hey Dan,

Yep.

-Chris

--------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2021/11/06 04:24
# dMod: 2021/11/06 04:24 
# Appl: Keyboard Maestro Editor, System Events
# Task: Select Menu Item “Insert Action by Name…” and Insert “FAV ” into the Search Field.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @Keyboard_Maestro, @System_Events, @Select, @Menu, @Item, @Insert, @Favorites, @Search, @Field
--------------------------------------------------------

tell application "System Events"
   tell application process "Keyboard Maestro"
      
      # Select “Insert Action by Name…”
      tell menu bar 1
         tell menu bar item "Edit"
            tell menu 1
               tell menu item "Insert Action"
                  tell menu 1
                     tell menu item "By Name…"
                        perform action "AXPress"
                     end tell
                  end tell
               end tell
            end tell
         end tell
      end tell
      
      # Insert “FAV ” into “Insert Action by Name…” field.
      if exists of window "Insert Action By Name" then
         
         tell window "Insert Action By Name"
            tell scroll area 1
               repeat while (exists of text area 1) = false
                  delay 0.1
               end repeat
               tell text area 1
                  set value to "FAV "
               end tell
            end tell
         end tell
         
      end if
      
   end tell
end tell

--------------------------------------------------------
5 Likes

Chris - I just realized I hadn't thanked you for this. I didn't get around to using any of it until yesterday, when I started working on importing my KMFAM actions into KM's native favorites (post to come soon).

2 Likes