HELP : toggle pause/unpause option on the app "effortless" based on application activation

Hi, I am using the app "effortless" --> https://www.producthunt.com/posts/effortless and I'm using keyboard shortcuts to navigate the app [ CMD+B to toggle the menu bar app then CMD+M to pause/unpause the timer ]

I am using the timer to know how much I spend on non-work-related tasks. So, i want to trigger the pause/unpause option of the timer based on which applications I am using.

  • If I am using "PDF expert" or "Mindmanager" [ work-related tasks ], I want the timer to pause itself using the keyboard shortcut I talked about earlier.
  • And if I am using any other app [ non-work-related tasks ], I want the timer to activate [ again the same shortcuts ].

I have been trying to accomplish this using application trigger. So, I made 2 macros : one to pause the timer and one to activate it based on the applications i am using [ see the screenshots ]. But, the problem is that every time I switch between applications in the same category, it pauses/unpauses the timer which is not what I want.

To clarify what I mean, here what is happening :

  • When I am working I switch between "PDF expert" and "Mindmanager" which triggers the macro and play/pause the timer. So, it doesn't remain paused X(
  • I have the same problem when I am switching between the "other" apps [ non-work-related activities ], the macro triggers itself and the timer doesn't remain active X(

I was wondering if there was a way to pause/deactivate the macro, or maybe tell it to activate only the first time then wait until the other macro triggers to be active again... or maybe another method entirely ?

Could you please help me solve this issue, I have been searching for days without finding any solutions.

Best regards,

One way would be for Keyboard Maestro to remember the state, and only toggle if the state changes. This will only work until you manually change the state. So you may also want to make some macros that you use to manually set the state appropriately, or indicate that you have changed the state, or set it to initial conditions.

Something like this:

Initially a variable “Working” set to 0 and the timer running.

A macro in the Global Macro Group, with Application Trigger for any application activates and actions that look like:

  • Set Variable “New Working” to 0
  • If any of the conditions are true:
    • Text %TriggerValue% contains Mindjet
    • Text %TriggerValue% contains PDF Expert
      • Set Variable “New Working” to 1
  • If variable Working is not %Variable%New Working%
    • Toggle Effortless
    • Set Variable Working to text %Variable%New Working%
1 Like

Thank you very much for the quick reply, i'm finally able to do what i want.. you're a life saver !

1 Like