AutoInput Question About AutoInput Scroll Action

Discussion in 'AutoApps' started by Don Clary, Oct 5, 2016.

  1. Don Clary

    Don Clary New Member

    Joined:
    Sep 30, 2016
    Messages:
    14
    Likes Received:
    1
    I have a long list of apps in a permissions list that I need to scroll through to select three toggles. The AutoInput actions to select the toggles work when I manually scroll through the list of apps.

    Here are the actions in the Tasker task:
    Code (Text):

    Toggle On-Top Perm (70)
    A1: Launch App [ App:Settings:Apps that can draw over other apps Data: Exclude From Recent Apps:Off Always Start New Copy:On ]
    A2: [X] AutoInput UI Query [ Configuration:Only Visible: false
    Only Clickable: true
    Check Screen State: false Timeout (Seconds):20 ]
    <scroll to Screen Filter>
    A3: AutoInput Action [ Configuration:Type: Id
    Value: android:id/icon
    Nearby Text: Screen Filter
    Action : Scroll Forward
    Is Tasker Action: false
    Check Screen State: false Timeout (Seconds):20 ]
    A4: AutoInput Action [ Configuration:Type: Id
    Value: android:id/icon
    Nearby Text: Screen Filter
    Action : Click
    Is Tasker Action: false
    Check Screen State: false Timeout (Seconds):20 Continue Task After Error:On ]
    A5: AutoInput Action [ Configuration:Type: Id
    Value: android:id/icon
    Nearby Text: Tasker
    Action : Click
    Is Tasker Action: false
    Check Screen State: false Timeout (Seconds):20 Continue Task After Error:On ]
    A6: AutoInput Action [ Configuration:Type: Id
    Value: android:id/icon
    Nearby Text: Twilight
    Action : Click
    Is Tasker Action: false
    Check Screen State: false Timeout (Seconds):20 Continue Task After Error:On ]
    A7: Flash [ Text:Done Long:Off ]
     
    The Scroll action to the first toggle does not seem to work.
    Is there a limit to how far the scroll forward action can scroll?
     
    Last edited by a moderator: Oct 6, 2016
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Just so I'm clear, does no scroll happen whatsoever?
     
  3. Don Clary

    Don Clary New Member

    Joined:
    Sep 30, 2016
    Messages:
    14
    Likes Received:
    1
    Correct. A1 to launch the settings always launches a new copy, so that I know it is at the top of the list. The list does not scroll at all (without my intervention). Are there logs that I can look at to see if an error is being generated for the scroll forward action?
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Can you try without the nearby text and see if that works? thanks
     
  5. Don Clary

    Don Clary New Member

    Joined:
    Sep 30, 2016
    Messages:
    14
    Likes Received:
    1
    I've removed the Nearby Text from the scroll forward action. It now scrolls slightly past the bottom of the current screen, but no further. I put the "Screen Filter" back in Nearby Text and the action does not scroll.
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Can you please add a 1 second wait between scroll actions? Maybe it's trying too fast :)
     
  7. Don Clary

    Don Clary New Member

    Joined:
    Sep 30, 2016
    Messages:
    14
    Likes Received:
    1
    I now have four scroll forward actions, with a 2 second wait in between. The screen has scrolled forward to where the 27th app is at the bottom of the screen, after these four actions, and still in apps starting with "A". However, this is no where near where the first toggle (starts with "S") is located. I suppose that I could construct a loop that would execute scrolls until it gets to the appropriate screen location, but that seems impractical.

    Is there another alternative?
    Is "Nearby Text" supposed to make it scroll until the text is in the window?
     
  8. Don Clary

    Don Clary New Member

    Joined:
    Sep 30, 2016
    Messages:
    14
    Likes Received:
    1
    I've modified the task with a loop. It now finds the first toggle and flips it. The loop continues to the subsequent toggles, but does not flip them when they are on the screen. Here is the task:

    Toggle On-Top Perm (70)
    Stay Awake
    A1: Launch App [ App:Settings:Apps that can draw over other apps Data: Exclude From Recent Apps:Off Always Start New Copy:On ]
    A2: For [ Variable:%item Items:1:45 ]
    <scroll to Screen Filter>
    A3: AutoInput Action [ Configuration:Type: Id
    Value: android:id/icon
    Action : Scroll Forward
    Is Tasker Action: false
    Check Screen State: false Timeout (Seconds):10 Continue Task After Error:On ]
    A4: Flash [ Text:%item Long:Off ]
    A5: AutoInput Action [ Configuration:Type: Id
    Value: android:id/icon
    Nearby Text: Screen Filter
    Action : Click
    Is Tasker Action: false
    Check Screen State: false Timeout (Seconds):0 Continue Task After Error:On ]
    A6: Flash [ Text:%err Long:Off ]
    A7: AutoInput Action [ Configuration:Type: Id
    Value: android:id/icon
    Nearby Text: Tasker
    Action : Click
    Is Tasker Action: false
    Check Screen State: false Timeout (Seconds):0 Continue Task After Error:On ]
    A8: Flash [ Text:%err Long:Off ]
    A9: AutoInput Action [ Configuration:Type: Id
    Value: android:id/icon
    Nearby Text: Twilight
    Action : Click
    Is Tasker Action: false
    Check Screen State: false Timeout (Seconds):0 Continue Task After Error:On ]
    A10: Flash [ Text:%err Long:Off ]
    A11: [X] Flash [ Text:%errmsg Long:Off ]
    A12: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
    A13: End For
    A14: Flash [ Text:Done Long:Off ]

    %err never displays anything.

    Any ideas why the subsequent toggles are not found and flipped?

    Sent from my SAMSUNG-SM-N930A using Tapatalk
     
  9. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    But does it work for the first toggle?
     
  10. Don Clary

    Don Clary New Member

    Joined:
    Sep 30, 2016
    Messages:
    14
    Likes Received:
    1
    Yes, but not the second or third.

    Sent from my SAMSUNG-SM-N930A using Tapatalk
     
: autoinput

Share This Page