MACRO: Spotlight Search Prompt

Hey Folks

Here is a little Fix for the Spotlight Search Prompt Documentation Macro

I Provide this Fix for all who use this wonderfull Macro with the Resources Package stored on Dropbox and who also run / ran into the same issues like @dbrooks787 and I described in earlier posts.

The Macro now uses the normal behavior to open the Spotlight Documentation.html file in the default Browser.

Macro: Spotlight Search Prompt Documentation -- Ver 1.0.1

Release Notes

  • Macro_Name: Spotlight Search Prompt Documentation

  • Macro_Version: 1.0.1

  • Orig_Author: @DanThomas

  • Last_Updated (Version 1.0): 2016/08/13 14:25 PDT

  • Modified_By: @Nr.5-need_input -- Tobias Zittlau

  • Mod_Date: 2021-12-21 18:30 GMT +1

PURPOSE:

  • Shows the Documentation (in a browser).

USAGE:

  • Launch this macro.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Log

Ver. 1.0.1 :

added:

  • ChangeLog

  • Set Variable to Text as orig. Variable „sspDocFilePath“

changed:

  • Value of Variable „sspDocFilePath“ as non URL-like path keeping tokens from Dan

  • Orig Comment moved to Group „Orig Comment from Initial Version — by DanThomas“

  • Orig URL-like Actions moved to Group „DECTIVATED: Filter with URL Encoding and open in Browser / Default App from Verison 1.0“

Ver. 1.0 :

Initial Version — Last Update by Dan Thomas 2016/08/13 14:25 PDT

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

!! Do NOT forget to Link it with the Spotlight Search Prompt Macro in the Group after import !!

Note: This Macro gets imported in a DISABLED State.
It MUST be enabled before it can be triggered.

Macro:

Spotlight Search Prompt Documentation -- Ver 1.0.1.kmmacros (58,6 KB)

I used to use this macro for something a while back but, at some point, it stopped working. I tried re-installing and setting up again, but get this error:

Spotlight Search Prompt
Variable 'sspOptions' not set

I can't see in the documentation that I need to set this. Can you tell me what I need to do to get this working?

Also, I previously had a version of this that it selected a specific variable for editing. I can't remember how I set it to do that, so if you can remind me that would be great. :slight_smile:

Thanks

Hey Lloyd,

Search for "sspOptions" – it should look something like this:

That's much too vague...

Selects where?

-Chris

Yeah, you're not wrong. I think that what I did before was I copied the default Spotlight Search Prompt and had a customised version where a specific variable was automatically selected (in the input/prompt) area, so I could just tab straight to the variable and edit it, rather than have to type to filter.

Basically, I wanted to have a way where I could use a hotkey to edit a variable (multi-line, almost like a log file) very quickly without opening KM. This macro was the one suggested to me at the time.

OK, I think I was completely missing that it had found a match because that specific part was disabled (and collapsed down) and I was somewhat blind to it. That's working now, thanks.

Any variable? Or a specific variable?

If I remember correctly Keyboard Maestro has no direct means to edit multiline text.

So you're relegated three options I can think of:

  1. Open the variable to an external editor like BBEdit (my preference).
  2. Use an AppleScript dialog (useable but a bit inflexible).
  3. Use Keyboard Maestro Custom HTML Prompt (very flexible but difficult for most users).

It seems to me that someone has posted an example of item 3 on the forum, but I couldn't find it with a cursory search.

-Chris

I searched back through my previous posts and found what I had previously used:

Variable Inspector Prompt:

So I must have been barking up the wrong tree. Will re-install this and see how I go

I have my mac connected to two other larger monitors, and when i am at my desk I use the these larger monitors more. However, teh Spotlight Search Prompt always shows up in the small Mac screen, is there a way I can change this to be shown (or moved after being shown) to the larger monitor?

IIRC, there's a setting in "sspOptions" called "customPromptPosition", and you can use that to position the prompt.

Figuring out if your other monitors are connected is something I don't know how to do, although I think I remember reading a topic on the subject not too long ago.

There may even be an easier way than this, but...

%Screen%1%
%Screen%2%
%Screen%3%
etc

Those tokens (use in text fields) return the dimensions of each screen. When one returns 0,0,0,0 then there's no screen there. So check if Screen%2% is 0,0,0,0, and if it's not, then you have more than one display connected.

From here, use Position Next Engine Window or Manipulate a Window to move the window to location on display 2 or 3 if the test is true, otherwise to a position on the internal.

In theory, anyway :).

-rob.

SCREENCOUNT(), maybe? You only need to worry about where to spawn the prompt "If calculation SCREENCOUNT() > 1 is true".

2 Likes

The Spotlight Search prompt seems to answer my prayers for a picklist system. Before fully diving in I was hoping to clarify one point.

The example screen shows that when typing in the name of the desired item to filter the list, the first letters are typed in.

For my application, I have complicated codes that I want to filter from a list of such codes. In some cases, I can remember the start of the code. In other cases, I can remember subsequent parts of the code.

For example, here is a list of the codes:

5031.now.set

6591.set.forever

now.897979.ok

If I type “now”, what is returned in the filtered list underneath? Is it:

“now.897979.ok”

because it starts with ‘now’.

Or is it:

“5031.now.set

now.897979.ok”

because both of the above contain ‘now’?

I believe a Spotlight search would return the latter (two items) in the filtered list, and that is what I need.

Does the MACRO: Spotlight Search Prompt return the latter (two items) or the former (one item)?

I received an answer in another thread, Methods to Pick from a List [Tutorial], that the "Prompt with List" Action achieves my objective, so I guess that the Spotlight Search Prompt is not necessary for my use case (and I am not aware of a compelling reason to use it instead of the "Prompt with List" Action).

I wrote a greatly-simplified Spotlight-like prompt that can be used as an alternative to the Prompt With List action. The main benefit is that it includes fuzzy search, so typing (for instance) aw would match Apple Watch and Apple Watch Ultra.

The macro and more details are here:

-rob.