r/AutomateUser • u/Antique-Eagle2340 • 5d ago
Loop or repeat routine
I am building air/heat temperature adjustments macros for device that is not automation available in smartlife. I would like to click up or down several times without adding a touch click every time but looping through a single touch click until the variable reaches a certain number, Any help?
1
Upvotes
1
u/ballzak69 Automate developer 5d ago
Use an Expression true block to either loop through the Interact touch again, or not, leaving the loop.
1
u/B26354FR Alpha tester 4d ago
You can use my Interact Block XPath Builder flow to generate the XPaths for the Interact block to interact with the Up and Down buttons in the app. Just give it the text in a button and paste the generated XPath that the flow copies to the clipboard into the Interact block(s). If there's no button text, you can use the Record Interactions or Inspect User Interface tools in the Interact block to find the IDs of the buttons you want to interact with.
0
u/waiting4singularity Alpha tester 5d ago edited 4d ago
for each, container =
abs(change)where change is the difference between is and should be.https://llamalab.com/automate/doc/block/for_each.html
https://llamalab.com/automate/doc/function/abs.html