AutoInput %err and %errmsg always empty

Discussion in 'AutoApps' started by Ghoria, Feb 2, 2016.

  1. Ghoria

    Ghoria New Member

    Joined:
    Jan 10, 2016
    Messages:
    26
    Likes Received:
    1
    For instance, when I try to let autoinput click on a text field that is not there, and the continue option is checked, I would expect to get some feedback in the error variables %err and %errmsg. However, these variables always come back empty.

    In fact, in all my tests of this and other actions, I have never seen anything being returned there.

    My question is, what are these variables good for, and in which cases do they return any information?
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    In the situation you describe the action will time out and will not result in an error. That's why no error message is present. Those variables are usually present when the Tasker action has a red circle on the left after it's finished running, Hope this clarifies it.
     
  3. Ghoria

    Ghoria New Member

    Joined:
    Jan 10, 2016
    Messages:
    26
    Likes Received:
    1
    This clarifies it, thank you. But it leads to another question: Is there no way to detect whether an action was performed so my script can react appropriately?

    If I set continue on, the action fails but my script is not aware of it.

    If I leave continue off, my script just hangs forever.

    Either way, there is no way for my script to manage the problem. Or is there?
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Unfortunately due to a Tasker limitation I don't think there's a way of finding out if an action timed out or not. This is not specific to plugins but with Tasker in General. :( Sorry!
     
  5. Ghoria

    Ghoria New Member

    Joined:
    Jan 10, 2016
    Messages:
    26
    Likes Received:
    1
    Well, is there really no way?

    A plugin might not be able to determine whether it has timed out, but it should know whether it has done its action or not.

    And if the plugin knows that, why can't it return some indicator, like %done=yes or %done=no ?
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Because if the Tasker action times out then the plugin can't return anything :(
     
  7. Ghoria

    Ghoria New Member

    Joined:
    Jan 10, 2016
    Messages:
    26
    Likes Received:
    1
    OK, you got me convinced. Forgive my skepticism.

    What if the plugin implemented its own timeout? If the plugin timeout is shorter than the tasker time out, could then the plugin return an indicator that says "timeout, nothing done"?
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    yeah, that could be a possibility! I'll try that when I get the chance, thanks!
     
  9. JImB

    JImB New Member

    Joined:
    Dec 18, 2015
    Messages:
    6
    Likes Received:
    0
    Here is a suggestion. Set the time out value to be reasonably short. You will get an error.
    Another option is to set up an AutoInput UI Query that looks for a response on the screen from the app that you are using. Again, you can use a short time out value.
     

Share This Page