[Solved] Feature Request: Shortcut to Image Clipboard

Feature request:
A quicker and more streamlined way get to Preferences > Clipboard > "Clipboard I'm looking for"

example:
aaaaa

thanks

Hey Dude,

I think you're going to have to be a bit more specific about what, where, and how.

But – if you're working with the click-at-found-image action then I can think of two suggestions off the top:

  1. KMFAM ⇢ @DanThomas' wonderful dev-tool for Keyboard Maestro.

  2. Creating a Keyboard Maestro macro to insert the action and then pop-up the named-clipboard meny, so you can type-select the desired image.

-Chris

sup man

Right now it's a little convoluted that you can't preview a Named Clipboard, there's no simple way to get to it from inside the macro window. Would help reduce friction.

idea is:

  1. For Named Clipboard
  2. After you assign a Named Clipboard, a shortcut appears.
    See screenshot with arrow mockup
  3. Clicking this arrow will send you directly to the selected Clipboard, inside Preferences>Clipboards section (inside preferences)

just my 2c, hope I explained myself

Hi @hello, are you talking about multiple screenshots that you want to select from the clipboard?
I have solved it like this for me:

2020_12_10_Support_1

32)ImageShot <0879 201210T191828>.kmmacros (24,7 KB)

Hmm... That's not a bad idea.

But you'll need to send in a formal feature request if you really want Peter to consider it.

Contact Keyboard Maestro Support

You can basically do this now though:

Display Keyboard Maestro Named Clipboards Preference Pane v1.00.kmmacros (8.8 KB)

At the moment the macro only takes you to the Named Clipboard Preferences and focuses on the Search field.

I put a stub in the AppleScript to allow populating the Search field with a string, but I didn't feel like doing the extra work to scrape out the name of the clipboard from the XML of the action.

I did look at the XML of one of the Named clipboard actions, and it looks like this can be done without too much trouble.

Here's the basic code for getting the action's XML:

tell application "Keyboard Maestro"
   
   set {selectedAction} to selection
   
   if class of selectedAction is not action then
      error "Please Select an ACTION!"
   end if
   
   set actionXML to selectedAction's xml
   
end tell

Now you have toys to play with...  :sunglasses:

-Chris

1 Like

^^^^ Sir @peternlewis

Probably the easiest way is to use the Value Inspector which can display clipboards.

2 Likes

Holy crap! How did I ever miss this??!!?? It just goes to show that no matter how much I know about KM, I really don't know squat. :smile:

And it also shows that I need to get back to reading forum posts more often.

2 Likes

It would be really cool to be able to dynamically create/delete items in the Value Inspector via AppleScript or Keyboard Maestro actions...

:sunglasses:

-Chris

1 Like

It would be hard to do via AppleScript, given you'd have to have some sort of type that could describe all the different options for an entry. And it's hard to imagine it would be useful as an action.

So I'm not sure this would ever happen I'm afraid.

Peter,

This seems to me to much simpler that scripting a Macro and its actions.
Why couldn't you treat the VI window like a macro, and each Value Block like an Action?

I'm not saying it is easy, but I do think it is very doable, and would be a great debugging tool.

Please take a look at it.

yes, this +1,000!

Making the Variable Inspector scriptable would allow the user to create debugging actions on the fly that would take a selection (action or text) as input, extract the desired element, and magically (and swiftly) create a V.I. entry.

tell application "Keyboard Maestro"

   set visible of variable inspector to true

   make new variable inspector of type Variable with name theVarName
   make new variable inspector of type Token Text with with tokenText theTokenText
   make new variable inspector of type Token Text Only with tokenText theTokenText
   make new variable inspector of type Calculation with forumula theFormula
   make new variable inspector of type Clipboard  named theClipboardName

end tell

--> Returns a VIRef for the V.I. entry.

--> AppleScript could delete VIRefs (entries) and get their values.

-Chris

2 Likes