Page 1 of 2

Scroll

Posted: 01 Dec 2018 10:59
by ziotempa
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?

Re: Scroll

Posted: 01 Dec 2018 13:35
by digitalstone
When the list doesn't respond to you're scrolling finger anymore.. that's usually a good indication.
Is that your question or...?

Re: Scroll

Posted: 01 Dec 2018 14:25
by ziotempa
:)
Automagic is scrolling... The question is 'how automagic can understand that there's nothing more to scroll? That the list reached the end?'

Re: Scroll

Posted: 01 Dec 2018 14:26
by ziotempa
Yes... I was impersonating Automagic ;-)

Re: Scroll

Posted: 01 Dec 2018 14:43
by digitalstone
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?

Re: Scroll

Posted: 01 Dec 2018 16:01
by ziotempa
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

Re: Scroll

Posted: 01 Dec 2018 19:11
by digitalstone
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.

Re: Scroll

Posted: 02 Dec 2018 13:27
by ziotempa
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!

Re: Scroll

Posted: 09 Dec 2018 18:13
by Desmanto
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.

Re: Scroll

Posted: 13 Dec 2018 13:28
by ziotempa
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