Macro : Open triggered script on click

Continuing the discussion from MBS FileMaker Plugin 13.2 development:

[weetbicks] My ultimate dream would be a single click to open a script attached to any button while in browse mode

If I understand correctly, I have attached my KeyboardMaestro debugger macros that should solve your request

In the attached gif I am holding the option modifier key.
FileMaker-click2script
FileMaker : Debug Macros.kmmacros.zip (2.5 KB)

2 Likes

That's awesome @rivet ! I had used some macros on my logitech mouse before but they were never great.

I'm running the KM trial and using your macro, works very nicely. I have modified it slightly to open the debugger if not already open, and to use a keyboard shortcut rather than the mouse click to activate.

One thing I couldn't get to work was to move the debugger window to somewhere where it would not be a nuisance. The macro can open debugger but it always opens in it's last place, and if that is on top of the button clicked, it acts to block the button press.

There are KM shortcuts to move and resize windows but they don't work with the debugger window, I presume because the debugger is some other kettle of fish, it doesn't apepar in the windows menu, and also has no minimize option associated. I wonder if it just cannot be manipulated by KM ?

nice! — There is a move and resize window step you could play with. I have attached a snap and some marcos.

FileMaker : window Macros.kmmacros.zip (6.1 KB)

1 Like

So awesome thank you, I now have the debugger being moved off to the right side of screen to avoid it opening in the wrong place, so cool. Also really like your automation of adding default entries into the data viewer !

NP, I'm glad it worked. BTW, here are two Keyboard Maestro features I like;

  1. common hotkey will open a floating pallet. Which you can single keystroke a choice
  2. You can add a Marco group to your Apple Menu

This is a great thread. Thank you, @rivet . I've been aware that there are tools like this out there, but this is the first time that I have had it so clearly in front of my attention such that I understand how powerful they are. Going to check this out.

2 Likes

Very interesting and useful idea!
I made a macro that does this, as well.
This one adds a few other helpful things.

  • It uses a more-complex keyboard shortcut (I get nervous about really simple ones).
  • If the frontmost app is not FileMaker, it cancels.
  • If the button is one of those that directly runs a single script step, this macro will not "step into" it, since that would actually run the step, which is definitely NOT what we want.
  • It make sure the Script Debugger is open, but if the current location does not cover the button, doesn't move it.
  • It uses the menu items for "Step Into" and "Edit Script…" and "Halt Script" instead of the keyboard shortcuts, as an extra measure of caution.
  • It restores the cursor position.

Debug - Edit Script for Button Under Cursor.kmmacros.zip (3.8 KB)

1 Like

FWIW, you can apply the application logic to the group instead of the macro.

1 Like

@weetbicks, FWIW… I saw you asking for MBS shortcuts for the debugger. Here is the config. I setup with Keyboard Maestro. I find it most efficient to keep the shortcuts on the left side of the keyboard.

I have also attached a macro, 'OK Filemaker,' where control-tab will click the Ok buttons in 'all' the FM dialogues. This saves a lot of mouse movement and keeps my hand on the left side of the keyboard.
OK FileMaker .kmmacros.zip (2.1 KB)

1 Like