← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #661046]: How to reuse the code in sikuli

 

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

    Status: Answered => Open

Saket is still having a problem:
Hi Masuo, I am using functions concept for the 1st time, so i am not
sure what i have done in right or wrong. Based on your suggestion I have
created a simple login logout function & calling it but I am getting
below mentioned error. Can you please help me with this ?

Error : 
[error] script [ Test_Function_Script ] stopped with error in line 3 at column 3
[error] SyntaxError ( "mismatched input ' ' expecting EOF", )

For your ref. line 3 in my code is  'def func001:'

My code is :

   def func001:
    hover("1511773804916.png")
    Click("1511773811501.png")
    wait(5)
    hover("1511773854020.png")
    click("1511773872796.png")
    print("Message : Function is called..")

#Example when you want to use func001 10 times

for no in range(10):
    func001()

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.