endless loop

Asked by Ju1+i-我. on 2018-05-11

before executing function a , there is a picture named b , but when it is executed , the picture b disappeared , causing an endless loop (actually , until today , function a has been operating well )

function a :

while True:
    if not exists(b):
        wait(2)
    else:
        break

could you please help on this ? thanks a lot

Question information

Language:
English Edit question
Status:
Open
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2018-05-14
Last reply:
2018-05-11
Ju1+i-我. (1ju2+i-a.) said : #1

I changed the picture b into a path (such as : "C:\\rpaproject\\output\\APO_Screenshots\\b " ), but still doesn't work

This code _must_ produce endless loop if picture b does not exist at the time of its execution. I don't know why man who wrote the code would want that, but they did.

What you want to happen here?

Ju1+i-我. (1ju2+i-a.) said : #3

thanks .

before executing function a , there is a picture named b in path c , but when it is executed , the picture b disappeared from path c , so it caused an endless loop

function a :

while True:
    if not exists(b):
        wait(2)
    else:
        break

Ju1+i-我. (1ju2+i-a.) said : #4

I use cmd to run several .py files , so i need to judge whether the previous step has been executed . If the execution is completed , picture b will appear in the screen , otherwise it will wait 2s

Can you help with this problem?

Provide an answer of your own, or ask Ju1+i-我. for more information if necessary.

To post a message you must log in.