MACRO: Macro Spotlight - DEPRECATED

Macro Library Macro Spotlight - DEPRECATED

###This macro has been superceded by MACRO: Go To Macro by Name (Spotlight).


NOTE: See simple installation instructions, below.

Macro Spotlight.v1.0.zip (199.0 KB)

Find macros in the Keyboard Maestro Editor, using a "Spotlight" type of search, and jump right to them:

##Installation Instructions

  1. Unzip the files.

  2. Import the Macro Spotlight.v1.0.kmmacros file.

  3. Move the file "MacroSpotlightResources.pkg" to some location you can always find.

  4. Launch the "Macro Spotlight" macro.

  • The first time, it will ask you to select the location of the "MacroSpotlightResources.pkg" file.

That's it!

3 Likes

Just wow, this is really incredible. Thank you Dan. It is really quite inspiring to see that such thing can be done with KM. I also really love the simplicity of your html prompt.

1 Like

Just wanted to make sure this shows up in forum searches:

Custom HTML Prompt with resources in a Package (.pkg) file

The “Macro Spotlight” macro (above) has the following features, that might be of interest to other macro developers:

The Macro’s HTML file, and its resource sub-folders like .css and .js, are all inside a Package (.pkg) file. In my opinion this makes it easier for the user to move the Resources to another location, and less likely that the user might delete a resource.

Accomplishing this is trivial:

a) Take the folder that contains your HTML file(s) and its resources subfolders, like.css, and rename the folder with the .pkg extension.

b) Inside the macro, treat the .pkg file just like the folder. It actually still is just a folder. So you can use it in paths, like (pardon any typos): /Users/Dan/Documents/MyFolder.pkg/MyPrompt.html. And if you test for its existence, remember that it is still a folder, so check for a folder’s existence, not a file’s.

It shows one way to ask the user to tell us where the resources package is located, so the user can move it around and our macro wont break.

I feel like there’s probably a slightly better way of doing this than the “Choose Folder” prompt I use, but it works. If someone has any ideas for a better solution, lt me know.

In the meantime, this works pretty well.

Thanks!

I'm constantly amazed at the things Peter has given us the ability to do. KM really is a propeller-head's dream.

Thanks again. That was the goal.

A couple of things I can't figure out how to make easily modifiable:

  1. Right now I automatically strip out leading "palette sort" numbers like "30)", etc. I wish I could come up with a way for the user to specify how to do this themselves. I thought about having a "Set Variable to Text" action where the user could specify a Regex, but that's hard to do, because special character sequences like slash-n get treated as newlines in the editor.

  2. I'd love a way for the user to specify macros to filter out. Currently, I filter out macros whose names contain "---------", because I use them as separators in Palettes. But again, I wish I could make it easy for the user to specify one or more Regexes to be used as filters.

Any ideas would help!

This is totally awesome, Dan! :thumbsup:

I expect to use this many times a day.

Just added to:
Best Macro List

Thanks. Be sure to read the post directly above yours, and let me know if you have any ideas.

Also, now that I have a “framework” for doing a Spotlight-type dialog, think about other places it could be used, and let me know.

I was thinking of using it with “Execute a Macro”, so it’s easier to find the macro to be executed. That’s all I’ve got right now.

Thanks!