'KEY_WIN' is not defined in imported script --- add: from sikuli import *
I have a number of tests, each one in a separate file. In order to make these scripts more readable and clear I have decided to move some of the functionality to external file and import it as a module to each script. For example consider the following piece of code which I have moved to that module:
type("r", KEY_WIN)
localLog.
paste(link)
localLog.debug("%s pasted", link)
type(Key.ENTER)
localLog.
This is defined in the module as function "windowsRun(link)" so I when the module imported I should have been able to run it like that (assuming that the module name is "generics") :
generics.
When I run my main script it seems that the module is being recognized and imported properly however I end up with the following error:
NameError: global name 'KEY_WIN' is not defined
Any idea why this might happen?
Thanks!
Eugene
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: