• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Tasker can't say variables

berky93

Newbie
Sep 11, 2010
46
5
So I downloaded taster and have been very busy (and entertained) making scripts for various actions. One profile I am working on is a "personal assistant" of sorts that will say certain information out loud when I dismiss an alarm. One issue that I have come across is that when I enter any of the sms variables into the "say" action it simply says "percent smsrf" (actually trying to pronounce "smsrf" or whatever variable I put.) I have gotten it to properly speak other variables, such as time and custom ones set earlier in the task. But I cannot seem to get these sms-based ones to work. Any ideas?
 
Have you had a recent text come in and this happens? Or are you simply trying to set it up and test it? Because, if the latter, then the variable may not be set yet so it doesn't have a value and Tasker only sees it as a word.

Also, if you are just typing in the variables, they are case sensitive. They need to be uppercase.
 
Upvote 0
I was typing them capital, just not in the post.

Anyway I found a fix of sorts for my issue. My original intention was to have the alarm simply tell me how many messages I had but since there was no variable for that I opted for instead saying who sent the last message and when. but now I have figured out how to not only speak aloud a sms count, but set the count to reset to zero whenever the screen is unlocked. And I set the alarm to not even say anything unless the sms count is greater than zero, which is also nice.
 
Upvote 0
Sure thing. I set up two new profiles and an additional task to accomplish this:

The first two profiles are for the message counter. The first of the two uses the "received text" event context. The task is:

Variable Set > Name %SMS to %SMS + 1 <--This adds one to the %SMS count whenever "received text" event is activated

The second of the two profiles is to reset the counter. It uses the "display unlocked" event context. Its task is:

Variable Set
> Name %SMS to 0 <--This resets the counter to zero whenever the screen is unlocked.

The third part of this setup is the alarm event task. Inside this task there are two items for the unread messages count:

1) Say > Text you have %SMS new messages If %SMS>0 <--this says aloud the unread messages count, only if there is at least one new message.
2) Variable Set > Name %SMS to 0 If %SMS>0 <--this resets the messages count back to zero, only if it isn't already zero (the "if %SMS>0" isn't really necessary)

Both of those can be incorporated into any task you have, as long as they remain in the same order. for instance, my alarm is set so that when the "dismiss" button is pressed (a popup appears when the alarm goes off) a task is activated that speaks aloud a greeting, the current time, and then performs the sms count events listed above. I am working on adding other information to the wake-up, such as email count and temperature.

I hope this is simple and easy to follow, feel free to ask any questions.:)
 
  • Like
Reactions: amlothi
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones