How to Loop a specific number of times

Post your questions and help other users.

Moderator: Martin

Post Reply
steelersmb
Posts: 30
Joined: 21 Oct 2013 21:27

How to Loop a specific number of times

Post by steelersmb » 21 Jun 2014 01:55

What I am trying to do is I have a flow that executes when I am in my home or work cell. It checks every 10 minutes for a WiFi connection and if it doesn't connect, I want it to loop back around and check for a period of maybe 3 times. If it doesn't connect on the 3rd time, I want it to stop trying. The reason for this is when I am driving around near my house, I don't want it to keep trying, only up to 3 times. Does anyone know how to create a loop with a counter in it?

Thanks.

User avatar
kintrupf
Posts: 257
Joined: 10 Sep 2013 08:59

Re: How to Loop a specific number of times

Post by kintrupf » 21 Jun 2014 06:58

Try the attached flows, they should do exactly what you want. You'll need to edit your own location in 2 places in the first flow.
The flow shows a statusbar notification while it tries to connect to the WiFi net.
flow_Auto_enable_WiFi_home_20140621_085030.xml
(6.3 KiB) Downloaded 1041 times
The second flow is used to stop the first flow when the notification is selected.
flow_Stop_auto_enable_WiFi_20140621_085105.xml
(2.72 KiB) Downloaded 823 times

steelersmb
Posts: 30
Joined: 21 Oct 2013 21:27

Re: How to Loop a specific number of times

Post by steelersmb » 21 Jun 2014 11:05

Thanks, I am checking them out right now. Do you find that the location works for you? I tired it and it didn't seem very accurate so that's why I used connected to cell instead.

Also, one more question. I don't see a place to edit the location twice, just the first step. There is a blank conditional statement. Is this the second place to enter the location?

User avatar
kintrupf
Posts: 257
Joined: 10 Sep 2013 08:59

Re: How to Loop a specific number of times

Post by kintrupf » 23 Jun 2014 11:38

steelersmb wrote:Thanks, I am checking them out right now. Do you find that the location works for you? I tired it and it didn't seem very accurate so that's why I used connected to cell instead.
For me it works quite well. At home I hardly ever need to switch on the WiFi manually.
The flow tries for several minutes to connect to the WiFi, while making some pauses to save some energy.
To make sure your WiFi is eventually found you can try to increase the number of loops and/or the radius of the location.
steelersmb wrote:Also, one more question. I don't see a place to edit the location twice, just the first step. There is a blank conditional statement. Is this the second place to enter the location?
Yes, that's right. I guess I was a little bit to thorough editing out my personal data :D

Post Reply