I want use KM to do this thing。
if one application is inactive for ten minutes,then quit it 。
2 Likes
Yes. You basically have to write it yourself as a macro, but you do something like this:
Trigger every minute
- Switch on Text %Application%1%
- Case BBEdit: Set Variable “BBEdit Idle Time” to 0
- Case Dash: Set Variable “Dash Idle Time” to 0
- etc
- Set Variable BBEdit Idle Time to calculation BBEdit Idle Time + 1
- Set Variable Dash Idle Time to calculation Dash Idle Time + 1
- etc
- If Application BBEdit is Running
- If calculation BBEdit Idle Time > 10
- Quit BBEdit
- If calculation BBEdit Idle Time > 10
- Else
- Set Variable BBEdit Idle Time to 0
- etc
1 Like
Not familiar with KM,can you give me a screenshot of this or kmmacros? I just tried but I cannot translate it to a macro。 the screenshot maybe long, but it is easy to understand for a KM beginner.
sorry for this request.
Using these:
- Switch or Case action
- Set Variable to Calculation action
- If Then Else action
- Application token
- Application condition
- Calculation condition
Something like this:
Keyboard Maestro Actions.kmactions (4.0 KB)