Posts

Showing posts from November, 2014

Update to Get Name from Number

I wrote up a description of the  Get Nickname From Number Task  on Tasker. I ran into a situation today that prompted a small update to this task. Everything was working fine until I got a text from someone that included the leading "1" (US number) in the phone number. That didn't match a person in my contacts, so it read the full phone number. After doing some playing around, it turns out that it didn't take much to get this to read properly. If the phone number is 10 digits, then go ahead and use the number. If it's 11 digits, then take the last 10 and use that as the number. Unfortunately, Tasker doesn't have any "string length" function. But since I'm working with digits, I can check to see if it's bigger than 999-999-9999 (actually, 9,999,999,999). The "Variable Section" function will take the last 10 digits of the phone number (characters 2 through 11) if there's a leading 1 on the phone number. Here's the update...

Tasker: Read SMS Full Message

This is a very long task that I use when I'm driving. When an incoming text is received, the task will tell me the name (or number) of the sender and then ask if I want to read the message. If I say "yes", then the message is read and then I'm asked if I want to reply to the message. At this point I can say "auto" and a "I'm driving" message will be sent to the sender. Or I can reply with my voice (speaking my message). If I speak the message, it's read back to me (for confirmation) and sent when everything sounds right. There's a lot of logic and jumping around in this task. One of the things I found out with the Goto statement is that you can go to an action number (the default) or an action label. If you specify a number, then any changes to your code might require a change to all the action numbers. If you specify a label, then you can add or remove lines all you want, as long as you don't remove the label. But you can't s...

Tasker: Read SMS Sender

In an effort to get completely hands-free texting going, I needed to be able to have my phone read an incoming text message to me. But I only need the hands-free when I'm driving, so I have two different tasks set up. This first one just reads the name of the person who sent me the text (or the number, if it's an unknown contact). There's a second task to read the full message. I make use of two utility tasks to accomplish reading the sender of the text -  Get Nickname From Number  and  Phone Number to Text  (if it's an unknown texter). Here's the outline of the task: Get the nickname of the person sending the text. Wait 1 second for the built-in text tone to complete (whatever notification tone I have set up will be used -- outside of Tasker). If the name (return value from the step 1 task) is the same as the number, then convert the number to read-able digits and say "you have a new text message from " and the number. If the name wasn't the same...

Tasker: Phone Number To Text

One of the issues with the  Get Nickname From Phone Number  task is that a phone number is returned if the contact isn't found. That's all fine, but when you try to read that number, Tasker will read it as a really long number. For example, 212-555-1212 would be read as "2 billion, 125 million, ...". So I wrote another utility to convert the phone number into individual digits with commas between. This way the number would be read as "2 1 2 5..." with pauses between each individual number. It's actually a pretty quick task, but I can't take all the credit for it - I'm very much a novice at dealing with arrays and splitting and joining values in Tasker. Here's the  post  that helped me. Phone Number To Text (30) A1: Variable Search Replace [ Variable:%par1 Search:. Ignore Case:Off Multi-Line:Off One Match Only:Off Store Matches In:%phonedigits Replace Matches:Off Replace With: ] A2: Variable Join [ Name:%phonedigits Joiner:, Delete Part...

Tasker: Get Nickname From Number

Another Tasker utility I set up was to get a name from a phone number. So, when someone calls or texts, I can say the name of the person calling/texting if they are in my address book. If they aren't there, then I want to say the number instead of the name. In addition, I have some names that are difficult to pronounce in my address book. So, I set up nicknames for those users which spell out their names phonetically. (I could also use the nicknames for people like "dad" if I wanted). This utility will return the nickname (if there is one for that person) so the pronunciation will be correct. Get Nickname From Number (28) A1: AutoContacts [ Configuration:Name as Nickname: true Phone Number: %par1 Package:com.joaomgcd.autocontacts Name:AutoContacts Timeout (Seconds):1000 ]  A2: Return [ Value:%acnickname Stop:On ] If [ %acnickname Set ] A3: Return [ Value:%par1 Stop:On ] If [ %acnickname !Set ] There's a parameter of the phone number passed in. It uses Auto C...

Tasker: Get Voice Command

The way I decided to set up Tasker is to use some reusable tasks that can be called from other places. The first one I'll talk about is the Get Voice Command. This task listens for some stock commands like "yes", "no", "cancel", or "repeat". It is a quicker listener than the "Get Voice Input" command which I'll talk about in another post. This is meant some some quick one or two word commands. It uses regular expressions to match commands (meaning, you can say "yep" or "yeah" or "yes sir" and it will return "yes"). Being generic like this means that I don't have to duplicate all these regular expressions everywhere. I can just call this task and if it returns "yes", then I know the user (me) said something like "yes" or "yeah" or whatever. There's an input parameter to the task of the message to speak before listening for the answer. The task will re...

Tasker For Android

I really like my Android phone. But I was having a bit of an issue with the hands free stuff. If I would receive a text in the car, I wanted to listen to it without having to look at my phone. Then, depending on the message, I might need to reply to it. I found an app that did that in conjunction with my hands free Bluetooth device, but it worked once and then wouldn't reliably listen to my voice commands. For example, it would be able to hear "yes" and "cancel", but it would never hear the content of the message I wanted to reply. So basically it was good for listening to the message and then making me frustrated. The app also couldn't compose a new text message. Every app I looked at wasn't totally hands free for composing a text message - you had to click on a button and then you could compose hands free, but even that for driving isn't safe. Then I heard about an app that listens for your voice, allows you to compose hands free, and reads/rep...