I have a macro which uses an Idle trigger. I can use IDLE/60 which appears to be the same as CALCULATE(%TriggerValue%) (both in units of minutes). However using (IDLE()/60) does not work. It seems to reset the idle time.
Bug? Feature? I cannot find a definition of IDLE in the KM manual, IDLE() doesn't work the way I expect, and CALCULATE(%TriggerValue%) works.
The Idle function is also found immediately by using Insert Function by Name (although the cursor in the editor must be in a field able to accept a function).
Hi @ccstone - thanks for that. I assumed the OP knew about “Idle” as a trigger as that what he said he was using; but he couldn’t find “IDLE” defined anywhere so I pointed him to the function.
You highlighted:
IDLE - Seconds since last user input
which is neither a function nor a trigger and does not appear in the manual either.
Of course I know the difference between “IDLE” and “IDLE()”, but thanks anyway.
The problem is now solved.
I ran three experiments:
Set Variable “SSIT1” To Calculation “CALCULATE(%TriggerValue%)”
Set Variable “SSIT2” To Calculation “CALCULATE(IDLE()/60)”
Set Variable “SSIT3” To Calculation “IDLE() / 60”
All worked.
So I’m now using the third one, but to be clear about the operator precedence, I’m using this calculation:
(IDLE() / 60) >= ScreensaverIdleTime
My earlier problem may have been an operator precedence problem.