AutoTools Tasker question

Discussion in 'AutoApps' started by androidgeek, Jun 12, 2019.

  1. androidgeek

    androidgeek New Member

    Joined:
    Jun 12, 2019
    Messages:
    1
    Likes Received:
    0
    I am new but the Tasker forum is redirected to a foreign language Google Groups page, so I post it here.

    My question is:

    I use an expression
    if (%TIMES-%Offtime)
    ...
    Endif
    %TIMES = builtin variable of current time (e.g. 1560123456)
    %Offtime = a variable set by me which contains an earlier time e.g. 1560000000.

    which does not work, it appears that arithmetic expressions are not supported.
    E.g when I log %TIMES-%Offtime then I see literally "1560123456-1560000000" instead of 123456 which is the numeric result.

    Documentation of Tasker lacks anything about how to use arithmetic expressions.

    How should I use them ?
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    You have to use the Variable Set action with the Do Maths option enabled to calculate the difference first, and then use the result of that in the If :)
    Hope this helps!
     
: Tasker, Math

Share This Page