3

I have Tasker speak texts to me if the phone is not in silent mode. (The task looks something like Say 'text from %SMSRN who said %SMSRB' if %SILENT ~ off, and it's run by a profile activated when a text is received.)

This works well except when I'm on a phone call and the text is read out while I'm in conversation! Doesn't happen much but it's annoying. So what I want to do is have it read out texts when I'm not in silent mode AND when I'm not on a call.

I can set up a variable %INCALL to equal 1 when the phone is off the hook (and clear the variable when the phone is idle).

Therefore, I want texts read (if %SILENT ~ off AND %INCALL != 1).

I can't see any way to do an AND in Tasker logic. Is there an elegant way to handle this?

3

You can specify AND logic in contexts, not just tasks. Don't forget that you can have multiple contexts that must all be met (logical AND) before the task(s) run. Try adding the context State > Call [Any, Invert = YES]; this would mean the profile will only activate 1) when a text is received AND 2) no call is active.

  • 1
    A great solution. I'd forgotten that by long pressing on a context the option pops up to add another context. I added the call state as you suggested and it's working perfectly. – William Denton Aug 22 '13 at 23:25
1

An easy way to achieve this would be to concatenate variables. You already mentioned setting %INCALL to "1" or "0". Have another numeric one for %NOTSILENT = 0/1, and then check for %INCALL%NOTSILENT ~ "01" (you might need to play with the syntax, this just gives the raw idea ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.