Scroll

Post your questions and help other users.

Moderator: Martin

ziotempa
Posts: 55
Joined: 30 Nov 2018 08:54

Scroll

Post by ziotempa » 01 Dec 2018 10:59

Hi all, first of all i want to congratulate. I've been using tasker for many years but automagic seems to me so much better now! I'm using it for a week now and I've already done a lot of things!
I have a question: I'm scrolling through the app list of installed app on my phone, searching for a specific app. How do I know when the list is ended? How do I understand that I have reached the bottom of the list?

User avatar
digitalstone
Posts: 342
Joined: 21 Oct 2017 12:36
Location: The Netherlands

Re: Scroll

Post by digitalstone » 01 Dec 2018 13:35

When the list doesn't respond to you're scrolling finger anymore.. that's usually a good indication.
Is that your question or...?
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)

ziotempa
Posts: 55
Joined: 30 Nov 2018 08:54

Re: Scroll

Post by ziotempa » 01 Dec 2018 14:25

:)
Automagic is scrolling... The question is 'how automagic can understand that there's nothing more to scroll? That the list reached the end?'

ziotempa
Posts: 55
Joined: 30 Nov 2018 08:54

Re: Scroll

Post by ziotempa » 01 Dec 2018 14:26

Yes... I was impersonating Automagic ;-)

User avatar
digitalstone
Posts: 342
Joined: 21 Oct 2017 12:36
Location: The Netherlands

Re: Scroll

Post by digitalstone » 01 Dec 2018 14:43

Sorry, i don't follow.
I suppose you're using an action such as "Launch App" and within there trying to find out where your app-list stops.
Why do you need to know where the end of that list is?
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)

ziotempa
Posts: 55
Joined: 30 Nov 2018 08:54

Re: Scroll

Post by ziotempa » 01 Dec 2018 16:01

Hmmm... Maybe the answer is easier than what I expect. Consider I'm scrolling the list of apps looking for a name which could not exists. So I scroll down one by one the apps. How can i stop scrolling when the list finishes? What I do in my loop is:scroll by one, check if the name exists in active window, if not, scroll by one, check if the name exists in active window, scroll by one.... And so on

User avatar
digitalstone
Posts: 342
Joined: 21 Oct 2017 12:36
Location: The Netherlands

Re: Scroll

Post by digitalstone » 01 Dec 2018 19:11

Can you please first explain what you have made and what technique/flow elements you are using?
With what did you created that app list, and what is your end goal with it?
And can i just assume then that you're using the "Control UI" element for things like "scroll by one"?

If so, the method to check if the app-list's end is reached is recognizing the same name as the previous checked list item (or just have it check the active window like you said).
When an item occurs twice (unless it's possible to have more than 1 app installed under the same name), you know that's the end.

About stopping the scrolling itself. Depending on your loop inside the code, i would give the command break() a try.
It will "break" out of a for loop.
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)

ziotempa
Posts: 55
Joined: 30 Nov 2018 08:54

Re: Scroll

Post by ziotempa » 02 Dec 2018 13:27

I think you already answered me, but before being sure I have to solve another problem, I'll open a new topic to ask. In the meantime I thank you!

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Scroll

Post by Desmanto » 09 Dec 2018 18:13

You will have to iterate scroll over the list, log the label and find if there is any duplicate. If the duplicate is at the last element, means no more scroll available, list ended.
You can see my flow in here : viewtopic.php?f=5&t=7580
Since you only want to know the end of list, no need to add any action there.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

ziotempa
Posts: 55
Joined: 30 Nov 2018 08:54

Re: Scroll

Post by ziotempa » 13 Dec 2018 13:28

Desmanto, are you paid by Martin to help mantain the forum?? I'm joking :D Just to say that you're a great resource in this forum! thank you

Post Reply