AutoInput Autoinput array does not empty on new UI query

Discussion in 'AutoApps' started by nmcj, Nov 29, 2018.

  1. nmcj

    nmcj Member

    Joined:
    Mar 24, 2016
    Messages:
    80
    Likes Received:
    2
    I'm working on a task that uses multiple UI queries. The issue Im having is that sometimes, the output throws up data from the previous query. I've added variable and array clears, but it still happens. Additionally, I've tried setting the arrays to my own local variables/arrays, but when I do this the aiid and aitext seem to get out of sync. That is to say that when I set the vairiables %aiid to %classid and %aitext to %class and then split on the commas, or set the arrays%aiid() to %classid and %aitext() to %class, %classid35 and %class35 aren't the same as %aiid35 and %aitext35. Any idea what is causing this?

    Thanks,

    NJ
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,861
    Likes Received:
    746
    Yes, that's just the way Tasker works, sorry. Plugins can't clear arrays, only set new values. You can use the Array Clear action to clear arrays between each call. Hope this helps :)
     
  3. nmcj

    nmcj Member

    Joined:
    Mar 24, 2016
    Messages:
    80
    Likes Received:
    2
    The task already uses Array Clears. But the issue persists.
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,861
    Likes Received:
    746
    Can you please export your task's description (not xml) so I can take a look? Long-click the task in Tasker->export description Thanks in advance
     
  5. bdiddy

    bdiddy New Member

    Joined:
    Jun 19, 2016
    Messages:
    9
    Likes Received:
    1
    i'm almost positive it's because you're joining the aitext and aiid arrays and saving them to a variable and then ret splitting them right?
    you are probably trying to split data that has a comma in it. go back and search/replace commas within each array element ( for loop)
    and you'll be good after that
     
  6. nmcj

    nmcj Member

    Joined:
    Mar 24, 2016
    Messages:
    80
    Likes Received:
    2
    Sorry for the tardy reply. I took the project in a different direction, using HTML read over UI Query. I may have lost the prior tasks, but if not, I'll post them.
     
: autoinput, arrays

Share This Page