How can I run this if condition blocks 10 times (or any number of times until the expected task is achieved)?

EXPECTED TASK:

Expected task is connected to Tasker. When the file is modified by mit ai2 , tasker app will do some task. If tasker successfully completed the task, file modification will be stopped by mit ai2. I already created all mit ai2 blocks and tasker codes according to that.

ie,

  1. If mit ai2 modified the file with word Set, then Tasker has to modify/overwrite it again with keyword.

  2. If Tasker modified the file with keyword, mit ai2 has to parse that keyword and modify the file again with word Set.

  3. If there is no keyword from Tasker, then Tasker will not modify the file with keyword, so the mit ai2's if loop/condition has to be ended.

Whenever mit ai2 modify the file, Tasker will recognize it automatically and act if it has/collected keyword (that is received from email-notification).

Probably depends on what is happening with Clock4 as to how you approach this.

1 Like

I updated the post again with clock image and little more explanation.

Assuming the call to MFile returns a text of some kind, you have an infinite loop by calling Clock4 in MFile.GotText ?

You also set text to Set, so you are likely to go off to an other screen, where none of these blocks will work, or generate an error because you have a clock running, or some other error. You have several loops within loops, which could cause chaos.

1 Like

Yes, that is the logical thought, but for some reason loop is not happening between clock4 and mfile.gotText. So, to loop it forcefully, I added 'open another screen' block with in if condition. So, the loop will forcefully happen only if get.text = Set. Luckily, I escaped from infinite loop issue.

I think, if MFile.ReadFrom block is run once, then it will go for MFile.GotText, but if we use clock to redo the process, it may not do. So, I tried 'open another screen' block to do it forcefully (may be in right order, I don't know.)

My issue is another and explained in above topic.

Personally, I believe you seem to be creating one of these:

(maybe combined with a Labyrinth)

Would suggest you re-think your entire logic, and simplify things.

1 Like

I shall study Oruborous and Labyrinth. But, not now. (Because of project deadline.)

Now, Can I use for loop for another 'open another screen' for 10 times? How can I do that? for loop for only one block, ie, 'open another screen'.

How can I do that?