← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #180492]: Creation locale-aware Sikuli scripts

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Put everything, that is needed for a locale environment into a separate
.sikuli and import that as needed.

an example:

--- locale1.sikuli
img1 = "some captured image language1.png"
text1 = "some text language1"

--- locale2.sikuli
img1 = "some captured image language2.png"
text1 = "some text language2"

--- main.sikuli
from locale1 import *
if exists(img1):
    click getLastMatch()
else:
    print text1; exit(1)

The docs apply: Reusing scripts and images and about SIKULI_IMAGE_PATH

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