← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #210756]: Not able to write the text file.

 

Question #210756 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/210756

    Status: Needs information => Open

Milind Warade gave more information on the question:
Hi Raviman,

Thanks for reply.

No error message occurs when I have tried to run the script. It was reading from text file in good manner.
But when I want to write it, then not working. No error is there. 

In my case: 
 In sikuly message, it was showing
[log] TYPE "UL"

but in the file I am not able to write it. At that time all the images
are present. I have given wait time for it.

And if I execute only,

wait(2)
if exists ("ULUNPAID-5.png"):
    type("UL")
    my_dir = "D:\\"
    el = "\n" # the end of line you want to use
    my_file=file(my_dir + "DPWrite.txt", "w")
    my_file.write("UL"+el) # if you want to have line breaks
    wait(2)
if exists ("WOWEEKLYOFF-5.png"):
    type("WO")
    my_file.write("WO"+el) # if you want to have line breaks
    wait(2)
if exists ("CLCASUAL-5.png"):
    type("CL")
    my_file.write("CL"+el) # if you want to have line breaks
    wait(2)
if exists ("PFPresentFul-4.png"):
    type("PF")
    my_file.write("PF"+el) # if you want to have line breaks
    my_file.close()
    wait(2)
wait(2)

then I am able to write the text file "DPWrite.txt"

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.