Forum Archive

Swiping Automation

PrinceValiant

I am brand new to python and my first project that I wanted to try was to automate a swiping feature but I have no idea how to do this. Is there a way to automate swiping on iOS?

Thank you for any help you can provide!

stephen

@PrinceValiant can you elaborate more on what you mean by swipe?

i feel @mikael might be the best to help with guestures if this is what you mean

PrinceValiant

Like I said, very new to this. If you swipe from the right side of your phone to the left, like in photos it will advance to the next picture. I want to create something that will do this on a 3-5 second timer.

mikael

@PrinceValiant, just to be sure, let it be said that Pythonista cannot ”swipe” other applications on your behalf.

But to implement what you said within Pythonista, look at NavigationView to animate the movement of the ”incoming” image, photos module to access your pictures, ImageView to present a picture, and ui.delay to manage the timing.

There are alternative approaches, but these are the most typical options.

cvp

Something like this Photos Book could be what you're looking for but my script is far to be perfect.
If you pick too much photos, sometimes it crashes and even a too quick restart of Pythonista app it-self does not solve the problem.
But, anyway, nice to see

https://i.imgur.com/S9m95Rd.jpg