• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Need Tasker Help

Olde

Lurker
Mar 2, 2016
3
0
Hello Tasker Friends,

I want to create a new task which can press a button in a app - waits until an error shows up - clicks on ok to close this error and press the first button again.

would be very nice if you can help me with this. i'm new to tasker and it's my first week with android :)

thanks in advance :)
 
It sounds a bit early after just a week, but maybe you pick up fast. ;)

Lets see, first of all, are you a SuperUser on your device? i.e. have root access?
[UPDATE: See Thom's post below for better description of input command]
If yes, you could run a shell script with the command "input tap X Y" where X and Y the co-ordinates of your button.
See the co-ordinates by enabling developer options and there is an option to show touch events.

Otherwise, the application AutoInput should do the job. It's easier to work with for a begginer and doesn't require root AFAIK.
 
Last edited:
Upvote 0
Hello Sumotori thank you for your answer! No i don't have root access till now. I bough AutoInput already and it works very fine for pressing this button. The problem is that i created a wait variable for 21 minutes but the error message doesn't pop up after exactly 21 minutes. I want Tasker to check when the error message pop up and click it and start the next step

i attached a pic of what i did till now.. sorry, real screenshot was not possible because the pad is connected to the camera over wifi. I need this task for bypassing a camera recording limit

IMG_2177.JPG
 
Upvote 0
Programming-wise I'd suggest a different approach, where instead of waiting 21 minutes, you wait until the message pops-up, i.e. "Wait Until %Error_Message ~ True". To do this, as you said, you need Tasker to know when the error pos-up and set the variable "%Error_Message" to true, where by default is false.

What type of pop-up message is that? Does it also go with a notification?

I am not very familiar with notification/toast interception. Some apps exist such as AutoNotification and Notification Listener. The second can be used for the part you want for free I think. (Make sure they work for what you want before purchasing any)

Random comment, I prefer to split tasks to smaller sections, and then use variables and profiles to trigger them, as opposed to a single task for all actions.
 
Upvote 0
Welcome to Android Forums.

(Overtaken by events while recording this.)

It can be done with Tasker if your phone is root-ed. I don't know a way to do it if it is un-root-ed.

Developer Options is a feature that is hidden when you get the phone.
It is made visible in different ways on different phones.
On my Droid Turbo 2 it is made visible by going to Settings/About Phone and tapping the Build Number seven times.
Developer options is then present at Options/Developer options.

Turn on Developer Option to show pointer location
Display the screen with the button of interest and position over the button.
Write down the screen coordinates ... like x=1100 y=440
Turn off Developer option een coordinates.
Turn off Developer Option to show pointer location

In Tasker when the condition is recognized that the page of interest is being displayed
You then use the Tasker action
Code/Run shell with the command ...
input tap 1100 440
... and specify root

There is a video showing this at ...
http://www.pocketables.com/2013/07/how-to-emulate-touch-input-using-tasker-and-root.html

... Thom
 
  • Like
Reactions: sumotori
Upvote 0
AutoInput can perform the "input tap " etc etc without need for root. Since he has already bought it, he doesn't need to concern himself with developer options and root to run shell commands.

All he needs now is to listen for the error event in some way, which shouldn't require root.

But to utilise Tasker's full potential, root is the way for sure! ;)
 
Upvote 0
It would be a challenging first project in Tasker (if you were root-ed).

I am on an un-root-ed Droid Turbo 2. The Developer options can be useful even if you are not root-ed.

(There have been about three discussions recently on how to do this in Tasker and that is the reason for posting it. My recommendation for learning Tasker is to start out small, nibble away at adding capabilities.)

... Thom
 
  • Like
Reactions: sumotori
Upvote 0
Programming-wise I'd suggest a different approach, where instead of waiting 21 minutes, you wait until the message pops-up, i.e. "Wait Until %Error_Message ~ True". To do this, as you said, you need Tasker to know when the error pos-up and set the variable "%Error_Message" to true, where by default is false.

What type of pop-up message is that? Does it also go with a notification?

I am not very familiar with notification/toast interception. Some apps exist such as AutoNotification and Notification Listener. The second can be used for the part you want for free I think. (Make sure they work for what you want before purchasing any)

Random comment, I prefer to split tasks to smaller sections, and then use variables and profiles to trigger them, as opposed to a single task for all actions.

Thank You Very Much Sumotori, Thanks to Tom too for the more skilled way :)

The Problem is, that the error is not connected with a notification. It's a Error in this Panasonic App, which says something like "Wifi Connection" interrupted or "Recording Time Limit reached" or maybe "SD Card Full" and there is a Ok button under it

Do you think that tasker can "listen" or check the middle of the screen till this pop up with the ok button shows up?

here you see a picture how the app looks and the error of panasonic pops up in the middle.

I just found out that it's possible to get the XY Position with the Easy Step Function of Auto Input so i know how to locate the Ok button. But i just need help to set up the parameters, so tasker waits till this field is "ready to touch"
 

Attachments

  • IMG_2178.JPG
    IMG_2178.JPG
    81.3 KB · Views: 188
Upvote 0
Can you post a picture when the error message has popped up?

I am thinking that you can create a profile that monitors for this Pop Up, similar to Taskers State > UI > Notification/New Window.
So if you can specify the Window label and type, this could be your trigger?

You also have AutoInput checking if an element is present via UI query?
 
Last edited:
Upvote 0
Sir, I need assistance for Tasker Split function. I am struggling to get data. How do I get data between two splits. For below I need to get : Colored ones as result. This is inside file with lots of records.

<td>Udveg</td><td>05:30</td><td>07:12</td>

I did was after reading file :
1st Split = %splitname SPLITTER <td>
2nd Split = %splitname2 SPLITTER </td>
Flash = %splitname21

In result I get Udveg</td> and NOT Ugveg

Please assist..Tnx
 
Upvote 0
Something like the following perhaps?

DevC (18)
A1: Variable Set [ Name:%test To:<td>One</td><td>Two</td><td>Three</td> Recurse Variables:Off Do Maths:Off Append:Off ]
A2: Variable Split [ Name:%test Splitter:</td> Delete Base:Off ]
A3: Variable Split [ Name:%test1 Splitter:<td> Delete Base:Off ]
A4: Variable Split [ Name:%test2 Splitter:<td> Delete Base:Off ]
A5: Variable Split [ Name:%test3 Splitter:<td> Delete Base:Off ]
A6: Flash [ Text:%test12
%test22
%test32 Long:On ]


I played with it further and what you posted should do what yo want. My conclusion is that you are not actually running what you posted. Your second Split is apparently not what you posted. A space in the splitter field perhaps.


... Thom
 
Last edited:
  • Like
Reactions: Samuel Jonas
Upvote 0
Something like the following perhaps?
DevC (18)

A1: Variable Set [ Name:%test To:OneTwoThree Recurse Variables:Off Do Maths:Off Append:Off ]

A2: Variable Split [ Name:%test Splitter: Delete Base:Off ]

A3: Variable Split [ Name:%test1 Splitter: Delete Base:Off ]

A4: Variable Split [ Name:%test2 Splitter: Delete Base:Off ]

A5: Variable Split [ Name:%test3 Splitter: Delete Base:Off ]

A6: Flash [ Text:%test12

%test22

%test32 Long:On ]
I played with it further and what you posted should do what yo want. My conclusion is that you are not actually running what you posted. Your second Split is apparently not what you posted. A space in the splitter field perhaps.
... Thom
at the outset i thank u&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as the method you gave i was able to get what i wanted.&amp;nbsp; Sir you are correct as all data is from&amp;nbsp; get http and saved into file.&amp;nbsp; i just copied small portion and did it.&amp;nbsp; everything&amp;nbsp; works fine except tasker getting too lengthy. Will surely workout for new ideas.&amp;nbsp; thanks
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones