Re: [Sikuli-driver] [Question #677354]: Can't invoke methods(click, hover, .. etc) from another script using IDE
Question #677354 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/677354 Status: Answered => Solved IvanKovtunov confirmed that the question is solved: Thanks RaiMan, that solved my question. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #677354]: Can't invoke methods(click, hover, .. etc) from another script using IDE
Question #677354 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/677354 Status: Open => Answered RaiMan proposed the following answer: see: https://sikulix-2014.readthedocs.io/en/latest/scripting.html#importing-other-sikuli-scripts-reuse-code-and-images -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #677354]: Can't invoke methods(click, hover, .. etc) from another script using IDE
Question #677354 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/677354 Description changed to: Please, observe my example: Script1.sikuli contents: import Script2 Script2.runScript2() Script2.sikuli contents: def runScript2(): print("Try to click") click("Screen Shot 2019-01-06 at 18.17.22.png") print("DONE") I run Script1 and get console output: Try to click [error] script [ Script1 ] stopped with error in line 2 [error] NameError ( global name 'click' is not defined ) [error] --- Traceback --- error source first line: module ( function ) statement 3: Script2 ( runScript2 ) click("Screen Shot 2019-01-06 at 18.17.22.png") [error] --- Traceback --- end -- Why global name 'click' is not defined? Can you provide the right way how to run script from another script? Is it possible with IDE to do so? Thanks. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #677354]: Can't invoke methods(click, hover, .. etc) from another script using IDE
Question #677354 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/677354 Description changed to: Is it possible to so, please, observe my example: Script1.sikuli contents: import Script2 Script2.runScript2() Script2.sikuli contents: def runScript2(): print("Try to click") click("Screen Shot 2019-01-06 at 18.17.22.png") print("DONE") I run Script1 and get console output: Try to click [error] script [ Script1 ] stopped with error in line 2 [error] NameError ( global name 'click' is not defined ) [error] --- Traceback --- error source first line: module ( function ) statement 3: Script2 ( runScript2 ) click("Screen Shot 2019-01-06 at 18.17.22.png") [error] --- Traceback --- end -- Why global name 'click' is not defined? Can you provide the right way how to run script from another script? Is it possible with IDE to so? Thanks. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp