Hotkey to Loop Over a List of Possible Menu Actions

Hello everyone,

I have been an avid reader of this forum for the past year, and I feel like I know tons of you just based on the tremendous contributions you have made on this forum that have seriously helped people like me that are often silent readers. I have decided to post my first question to see if anyone could help me find a solution (apologies if this was addressed prior).

I use DevonThink quite often in my day to day tasks.

I sometimes need to jump quickly between different windows panes of DevonThink (ex: the sidebar, the file view, the document preview, etc.)

Here are the possible DevonThink focuses that one can switch between:

  • Move Focus to Sidebar ^ ⌥ ⌘ S
  • Move Focus to View ^ ⌥ ⌘ V
  • Move Focus to Preview ^ ⌥ ⌘ P
  • Move Focus to Inspector ^ ⌥ ⌘ I

Question:
Is there a way to use a hotkey to trigger to cycle (with each press) to next Focus view from the list above? One could make an analogy with the "tab" press whenever filling a form, allowing jumping to next field.

I personally would find it much faster and more intuitive to just press -- for instance -- HyperKey + V at multiple occasions to get to the intended Focus View, rather than move my fingers around to think of the appropriate Keyboard Shortcut to achieve this.

Suggestions on how to achieve this will be greatly appreciated.

Thanks!

1 Like

Using a Variable that counts each time a macro is run allows for it to cycle through any number of different actions with a different Action for each run and when reaching the total number of tasks the variable gets reset and the cycle starts again.

Here is a basic example for cycling through 4 tasks (as you have). The magenta actions would be replaced with however you are doing the Focus (either by menu items or replicating the shortcuts).

EXAMPLE Macro Cycles Through 4 Options.kmmacros (5.9 KB)

Click to Show Image of Macro

1 Like

Not a DevonThink user -- but are those four foci available as menu items? For example, if there was a list of all four with the active one ticked you could use "menu is marked" Conditions to check the current focus and determine the next to switch to.

IIRC, DevonThink also has good AppleScript support so there might be a way to leverage that to do the same.