Open UI Query with multiple variables

Discussion in 'AutoInput' started by Bill2938, May 16, 2017.

  1. Bill2938

    Bill2938 New Member

    Joined:
    May 12, 2016
    Messages:
    8
    Likes Received:
    0
    Is it possible to use an IF statement multiple variables in an AND statement?
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    4,913
    Likes Received:
    440
    Sorry what do you mean exactly? Can you give a concrete example?
     
  3. Bill2938

    Bill2938 New Member

    Joined:
    May 12, 2016
    Messages:
    8
    Likes Received:
    0
    I use UI Query to set two variables from a particular screen. If I get a match in the IF statement on both then proceed to the task, if there is no match I refresh the screen until I see the match. I have good success with one variable in another task but this would improve my results.
    A4: AutoInput UI Query [ Configuration:App Package: com.amazon.rabbit
    Check Screen State: false
    Variables: utx, time
    Only Visible: true
    Only Clickable: true Timeout (Seconds):20 ]
    A5: If [ %time ~ *AM* & %utx ~ *UTX2* ]
    A6: AutoInput Action [ Configuration:Type: Id
    Value: com.amazon.rabbit:id/scheduling_offer_time
    Action : Click
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    4,913
    Likes Received:
    440
    If I understand correctly this is not related to AutoInput, correct? You mean the Tasker "If" condition? What exactly isn't working about it?
     
  5. Bill2938

    Bill2938 New Member

    Joined:
    May 12, 2016
    Messages:
    8
    Likes Received:
    0
    The task refreshes a screen in an app until it detects an "offer". The offer has several elements that I can use in takser but so far I am only able to use one at a time. It would be useful to me to be able to use the tasker IF command to use two variables to determine the next action.
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    4,913
    Likes Received:
    440
    Ok, so what isn't working about the method you used?
     
  7. Bill2938

    Bill2938 New Member

    Joined:
    May 12, 2016
    Messages:
    8
    Likes Received:
    0
    When both conditions are met the task should click a button but it doesn't happen. I can see the screen refresh until it gets the desired combination but it just continues the loop. I can run the task with one variable very reliably.
    If [ %time ~ *AM* & %utx ~ *UTX2* ]
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    4,913
    Likes Received:
    440
    On each loop, can you please show the contents of %time and %utx in a flash action? Maybe they really don't match those values :)
     

Share This Page