Tasker Help

Discussion in 'Android Apps & Games' started by Darushe, Sep 23, 2010.

  1. Darushe

    Darushe New Member
    15

    Sep 23, 2010
    1
    0
    15
    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?
     

    Advertisement
  2. Steven58

    Steven58 Reformed PH
    VIP Member
    3,823

    Feb 19, 2010
    32,921
    25,271
    3,823
    Male
    Welcome to the Android Forums community! Glad you signed up! Feel free to join the conversations! :D

    Steven


    I'll move this to the Apps section for you.
     
    Darushe likes this.
  3. UncleMike

    UncleMike Well-Known Member
    163

    Nov 15, 2009
    2,323
    482
    163
    Central NJ
    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.
     
    jshugart likes this.
  4. Maris

    Maris Well-Known Member
    48

    Jun 1, 2010
    188
    24
    48
    Ohio
    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.
     
  5. jshugart

    jshugart New Member
    5

    Feb 8, 2011
    2
    0
    5
    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
     
  6. dcampbe1

    dcampbe1 New Member
    5

    Feb 26, 2011
    4
    0
    5

    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?
     
  7. takeshi

    takeshi Well-Known Member
    163

    Dec 6, 2009
    3,354
    282
    163
    %20 is interpreted as a space in URL's.
     
  8. UncleMike

    UncleMike Well-Known Member
    163

    Nov 15, 2009
    2,323
    482
    163
    Central NJ
    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".
     
  9. dcampbe1

    dcampbe1 New Member
    5

    Feb 26, 2011
    4
    0
    5
    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.
     
  10. UncleMike

    UncleMike Well-Known Member
    163

    Nov 15, 2009
    2,323
    482
    163
    Central NJ
    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.
     

Share This Page

Loading...