How to call sikuli script within another sikuli script

Asked by Benjamin Bruffey

So I am trying to create a script that will go through and check a GUI for me and then i want to initiate that script within another sikuli script

#gui_checker.sikuli
def genDat(val):
    if val == "y" or val == "yes" or val == "1" or val == 1:
        print "success"
    else:
        print "failure"

---------------------------------------------------------
#valid_checker.sikuli
import gui_checker

gui_checker.genDat(1)

** this is just an example as the contents shouldn't matter much, I'm running into the issue of the second script telling me there is no module named gui_checker, is there some default folder where I need to store my scripts? or a way to route them to each other?

thanks

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Benjamin Bruffey
Solved:
Last query:
Last reply:
Revision history for this message
Benjamin Bruffey (benjamin-bruffey) said :
#1

fixed my issue, there was something strange happening concerning file names, resaved each script under a new name and then tried running and all issues were absolved.

Revision history for this message
Brett Crossley (t-brett) said :
#2

I had this same issue. Turns out it's because when you rename a file nothing renames the .py and .html files inside the directory.
I changed mine and now it works.
Also - you can't use _ in file names it seems.