Displaying the file in columns and sort with modified date. But there some error

The macro used two hotkeys, but it wasn't working.


If you wanted help, you would need to provide the macro for testing.

The relationship between your thread title and thread contents offers puzzlement, but little else.

Thanks. it is only two hotkeys.
Sort file in the finder.kmmacros (2.4 KB)

If you are simply trying to use standard key bindings in the Finder to produce two effects in sequence, then:

  1. The Finder needs to have been activated by the time either keystroke is emulated – (start with an Activate Finder action, and possibly as Pause until Finder in foreground), and
  2. You may also need to allow for a pause between the two events. Experiment with a Pause action.

Finder -- in columns grouped by modified date.kmmacros (3.5 KB)


Hi @llity

For future reference, rather than replicate keystrokes it is usually more robust for this sort of thing to see if the items are available in the App's menus. If they are you can use Keyboard Maestro's Select or Show a Menu Item Action. Use the gear icon in top right of the Actions to navigate to the menu rather than typing it in.
One advantage of this method is it allows you to forget the default hotkeys for menu items or even change them and the Macro will still work.

As @ComplexPoint mentioned, you might need to experiment with adding a tiny pause between the two Actions if the Macro doesn't work, to allow the System to catch up.



One advantage of the keybindings, of course (particularly when macros are being shared) is that they are independent of language and locale.

1 Like

Thanks, it's work.

This method is also work for me.

But, sometimes, the menu show Group by not Sort by, and I prefer to view as Group by, how to deal with this case?


I might be misunderstanding what you are asking. But in order to get the menu item "Group By" I think you have to have first checked "Use Groups"? In which case you could have Keyboard Maestro first mark "Use Groups". Something like this:

1 Like

Thanks, it's working. :slight_smile: