Does anyone have any experience with tasker, specifically in regards to making a talking clock to announce the hour. There are some profiles on tasker wiki, but the DL file won't download into tasker, says the URI cannot contain spaces...I attempted manual entry, but still cannot get it to work. I attempted another one I found on the site, that was fairly easy to enter, but cannot get it to talk in 12 hour format... any ideas?
Welcome to the Android Forums community! Glad you signed up! Feel free to join the conversations! Steven I'll move this to the Apps section for you.
This may help: Variable Set %MYTIME %TIME Variable Split %MYTIME "." Variable Set %MYAMPM "a m" Variable Set %MYAMPM "p m" If %MYTIME1 > 11 Variable Subtract %MYTIME1 12 If %MYTIME1 > 12 Variable Add %MYTIME1 12 If %MYTIME1 = 0 Variable Set %MYTIME1 %MYTIME1 [Do Maths] (should eliminate any leading zeros) Variable Set %MYTIME2 %MYTIME2 [Do Maths] (should eliminate any leading zeros) Variable Set %MYTIME2 "o %MYTIME2" If %MYTIME2 < 10 Say %MYTIME1 %MYTIME2 %MYAMPM Tested at 18:09 it said "six oh nine pee em" NOTE: Edited from original post to address some overlooked issues.
I import profiles by first saving them to the SD card under Tasker/profiles. Then from the main screen select menu/profiles/import single profile. That will show you a list of profiles from which to select one.
Much thanks UncleMike, this helped me. I added the bolded task below to make it so 6:00 pm would be read as "Six O Clock P M" Variable Set %MYTIME %TIME Variable Split %MYTIME "." Variable Set %MYAMPM "a m" Variable Set %MYAMPM "p m" If %MYTIME1 > 11 Variable Subtract %MYTIME1 12 If %MYTIME1 > 12 Variable Add %MYTIME1 12 If %MYTIME1 = 0 Variable Set %MYTIME1 %MYTIME1 [Do Maths] (should eliminate any leading zeros) Variable Set %MYTIME2 %MYTIME2 [Do Maths] (should eliminate any leading zeros) Variable Set %MYTIME2 "O Clock" If %MYTIME2 = 0 Variable Set %MYTIME2 "o %MYTIME2" If %MYTIME2 < 10 Say %MYTIME1 %MYTIME2 %MYAMPM
I have a profile that does not use DO MATHS and has no problem with its leading zeros, except for when I split the time variable, and add 2 hours. When I join the variables I get single digit hours when the time is <10:00. I have succeeded in writing the whole thing using DO MATHS but would like to learn how to utilize different logic. I've followed your logic on removing zeros but do you have one for creating leading zeros?
I'm not quite sure what you're asking, but the only reason I eliminated the leading zeros was to get a preferred pronunciation by the Say action - so instead of saying "six zero nine pee em" it would say "six oh nine pee em".
Basically, I'm looking for a snippet that will pad a single digit variable with a leading zero. I just want to do the reverse of what you've done to eliminate a leading zero.
As long as the values are integers you could do something like this: Variable Set %VAR %VAR [Do Maths] Variable Set %VAR 0%VAR [If %VAR < 10] This should make sure the leading zeros are eliminated, then add them back in where needed to get two digits.