KeyRoutines
ConditionFreecond.trigger.is

Do different things depending on what started a routine

Started by trigger checks which of a routine's own triggers began this run. That lets one routine react a little differently to a hotkey, a schedule or an app opening without keeping separate copies.

How it works

  • Pick one of this routine's triggers from the list.
  • It's true when that trigger started the run.
  • Runs you start yourself or that another routine starts aren't started by a trigger, so the check is false and says so.

Routines that use it

Quiet when scheduled

A cleanup routine runs from both a hotkey and an At a time schedule; only the hotkey run shows a banner when it's done.

Ask only when pressed

When the routine starts from App launched it just works, but from a hotkey it first asks with Ask Yes or No.

Different layouts

Apply one window layout with Apply layout when a monitor is connected and another when the run comes from a hotkey.

Settings

SettingWhat it does
Trigger idThe id of one of this routine's triggers.

Good to know

  • Manual runs and runs started by another routine always count as not started by a trigger.

Questions

Can one KeyRoutines routine have more than one trigger?
Yes. Add several triggers and use Started by trigger inside an If to tell them apart.
Why is Started by trigger false when I click Run?
A click on Run is a manual start, not a trigger firing, so the check reports that the run wasn't started by a trigger.

Pairs well with

Build this routine in KeyRoutines

Free from the Microsoft Store for Windows 11 and 10. Pro is a one-time upgrade.