> I am experimenting with input tap to make Tasker tap the screen in certain places. So I made a task that opens a app and clicks the screen in certain areas.. I want to make it so the task repeats as much as I want. I think it's called looping. (would be nice if I could make a pop-up to ask how many times) but that is over my head. I do not understand variables very well because I can't find any in depth guides. Thank you
Could you post your profile here... Long press on the profile name / ( 3 dot menu with 4.0+ ) export / export description to clipboard (not XML)
The beginner mode needs to be off and the profile needs to have a name to be able to export.
And give a detailed explanation of what you are trying to achieve.
There is a "goto" action that lets you jump back to a previous action. It is in 'task / goto'
Rich..
Post your profile using the process above and you might be surprised with the volume of input and advice you get :-)
A lot of users LOVE to help and we've all been lost in tasker at some point.
This should be easier to read...
OK.. you forgot the detailed description of what is working and what you would like to do.
To loop the entire task you would just add a goto action at the end. However this will loop endlessly so you need a "stop" action somewhere in the loop but you need to figure out when you want to stop the loop. IE.. stop after it loops x times, or stop after a certain amount of time has past, or stop when app is exited.
Is this task working as expected?
When do you want the loop to stop?
Thanks!
I would with the variable query and for loop as mike recommended. To expand a little on it you would put the variable query wherever you want to get the input, probably the first action. It is in actions / variable. I would set the fields as follows ..
Title: Input Loop count
Variable: %LOOP
Input type: numeric/decimal
Default: %LOOP
Then the for loop requires 2 actions, they are under actions/task/for and actions/task/end for
Insert the "for" action above A5 and set the fields like this..
Variable: %null
Items: 1:%LOOP
Then put the "end for" action at the end of the loop
Post back if you get stuck....
>
> So I can just long hold on action 5 and add "goto"?
If you use the "goto" you will need to make your own counter with a "variable add" action... the for loop will be easier ...
What do I fill in in the goto action, it has a selection for type,
You can got a action number, or a label. ( all actions have a "label" option)
and" if"
You would use the " If" in conjunction with the variable add..
Give the for loop a try ..
For Example (247)
A1: Variable Query [ Title: Variable:%repeat Input Type:Numeric / Integer Default: Background Image: Layout:Variable Query Timeout (Seconds):10 Show Over Keyguard:On ]
A2: For [ Variable:%loop Items:1:%repeat ]
A3: Flash [ Text:For example loop: %loop Long:Off ]
A4: End For
This will give you an idea of how loops work based on variable query :-)
> Please keep in mind that I know how to use Tasker very well but I have never touched a variable before and I have no Idea what I'm doing.
Okay then... I would suggest starting with the basics, if you have not done so already please read the pocketables beginners guide.
This is a simple task that allows you to set a variable to the number of times you want to loop through a task, then it will loop through the task that many times.
My First Variable (300)
A1: Variable Query [ Title:input number for my first variable Variable:%Myfirstvariable Input Type:Numeric / Integer Default:%Myfirstvariable Background Image: Layout:Variable Query Timeout (Seconds):54 Show Over Keyguard:Off ]
A2: Variable Add [ Name:%count Value:1 Wrap Around:0 ]
A3: Flash [ Text:Number of times looped --- %count Long:Off ]
A4: Goto [ Type:Action Number Number:2 Label: ] If [ %count < %Myfirstvariable ]
I have attached the XML so you can import it to see how the actions are set up and test it..
Make sure you select tasker to download the XML from the email.
Then in tasker go to the task edit screen and long click on the task tab / select Import.
While in the task edit screen you should see a small play button. You can use this to manually fire and test the task.
Read the entire section on "variables" in the user's guide. Pay close attention to the difference between "global variables" and "local variables'
Post back with any questions you have, once you fully understand how the variables work we can implement them into your profile..
Might be Huge but IMO its well worth a read,Andreas is great at explaining stuff,
Jay M
Thanks. Give me about a day to read the pocketables article because it's HUGE. And when your task you sent me asks for The number of times you want it to Loop, do I just delete the text and type 2 or 3 or 4?
--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/groups/opt_out.
when your task you sent me asks for The number of times you want it to Loop, do I just delete the text and type 2 or 3 or 4?
Yes, just delete the variable name. This is the default value of a variable that has not been set. You should only see this the first time you run the task, after that you should see the last value you entered..
There is a whole section on variables.......
http://www.pocketables.com/2012/08/beginners-guide-to-tasker-part-2-variables.html
I'm having a hard time believing you could have missed this...
He andreas does not go into the complicated stuff such as variables though..
IMO most of what he writes covers the complex stuff, I learnt how to use variables and some other cool stuff from his News fetcher Tutorial.
http://www.pocketables.com/2012/09/beginners-guide-to-tasker-part-4-variable-data-processing.html
Jay M
Test 2 With Var (22)
A1: Load App [ App:AppTrailers Data: Exclude From Recent Apps:Off ]
A2: Wait [ MS:0 Seconds:14 Minutes:0 Hours:0 Days:0 ]
A3: Variable Query [ Title:input number for my first variable Variable:%Myfirstvariable Input Type:Numeric / Integer Default:%Myfirstvariable Background Image: Layout:Variable Query Timeout (Seconds):54 Show Over Keyguard:Off ]
A4: Variable Add [ Name:%count Value:1 Wrap Around:0 ]
A5: Flash [ Text:Number of times looped --- %count Long:Off ]
A6: Run Shell [ Command:input tap 360 408 Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]
A7: Wait [ MS:0 Seconds:42 Minutes:0 Hours:0 Days:0 ]
A8: Button [ Button:Back ]
A9: Wait [ MS:0 Seconds:8 Minutes:0 Hours:0 Days:0 ]
A10: Button [ Button:Back ]
A11: Goto [ Type:Action Number Number:4 Label: ] If [ %count < %Myfirstvariable ]
> Thank you very much rich d for the example. I tried to squeeze in a part of your task to mine. I can't get it to work though.. I do not understand why so I will put the description below:
>
Looks OK..
what exactly happens after you input the number and hit the green check??
Does it not exit the app after the second back button action??
You can check the flow with the run log.. menu / more / run log.
If you can't get it post back with the run log.
When viewing run log hit menu/external viewer to copy and paste the log here..