Yes, you can, stupider man that gives up easily...
How about:
If %KEYG ~ off
Wait <whatever time interval you want>
Keyguard Set On, If %SCREEN ~ off
Turn On, If %KEYG ~ on
System Lock, If %KEYG ~ on
End If
The bit that had me thrown for a while was the task not properly
firing WHILE the display was off. To get round this, set the Task
Properties to Keep Device Awake.
However, the Keyguard will still only be set once the Display has
actually come on - the Turn On action sorts that out.
But then Tasker would turn Keyguard on after the time had elapsed, so
that's why there is the 'If %SCREEN ~ off' bit for the 'Keyguard Set
On' action.
So putting in the System Lock action, but ONLY if the Keyguard is on,
turns the display off immediately after it has come on to enable
Keyguard - but not if you have turned Keyguard off manually.
For that, have a look at the Keyguard toggle widget (http://
tasker.wikidot.com/keyguardtog), which I have installed and played
around with.
I have a profile that sets the Keyguard on when the phone isn't being
charged or has no USB plugged in, with the event Display Off, so I
just added the above actions to the Lock task and it seems to work
okay.
Hmmm - mebbe I should add it to the Wiki?
> > > Pent- Hide quoted text -
>
> - Show quoted text -