← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #243363]: import scripts does not work always. I have tried so many times but succeeded only twice or thrice.

 

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

    Status: Answered => Open

amit mhetre is still having a problem:
Still it is not working. Below is the code. And what if I need to import
Ship script in any other script ?

Login Script :

from sikuli import *
openApp("C:\\Program Files\\Mozilla Firefox\\firefox.exe")
wait(3)
url = "www.staging.shipsticks.com"
type(url+Key.ENTER)
wait(10)
if exists("1391517318147.png"):
    click("1391517318147.png")
else:
    click("1391518980878.png")
click("1391517318147.png")
<rest of the code>

   
Ship Script :

import Login
exists("1391519760686.png")
click("1391519760686.png")
wait(3)
<rest of the code>


________________________________
 From: Test <question243363@xxxxxxxxxxxxxxxxxxxxx>
To: amitbmhetre@xxxxxxxxxxx 
Sent: Thursday, 6 February 2014 6:41 AM
Subject: Re: [Question #243363]: import scripts does not work always. I have tried so many times but succeeded only twice or thrice.
 

Your question #243363 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/243363

    Status: Open => Answered

Test proposed the following answer:
The line:

from sikuli import *

Should appear in the file you are IMPORTING not the file you are
importing INTO.

Example, I want to import a script named test into a script named
example.

In example.sikuli:

import test

In test.sikuli:

from sikuli import *

<code goes here>

-- 
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/sikuli/+question/243363/+confirm?answer_id=2

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/sikuli/+question/243363

You received this question notification because you asked the question.

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