sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #29669
Re: [Question #258335]: Windows path variables
Question #258335 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/258335
Status: Solved => Open
fordox is still having a problem:
Сorrect my code, please. I can not get "popup ("1")". delay before
creating the file does not work and conditions are not met.
import os
userprofile = os.environ.get("USERPROFILE")
file = r"%s\Downloads\file.exe" % userprofile
fileok = False
while True:
wait(1)
popup ("0")
for i in range(20): # wait for 20 seconds, until the file is created
if os.path.exists(file):
fileok = True
wait (1)
popup ("1")
break #continue with the "popup ("3")"
if not os.path.exists(file):
break # continue with the next line
popup ("3")
for i in range(20): # wait for 20 seconds, until the file is created
if os.path.exists(file):
fileok = True
wait (1)
popup ("1")
break #continue with the "popup ("4")"
if not os.path.exists(file):
break # continue with the next line
popup ("4")
... #etc
continue
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.