Re: [Sikuli-driver] [Question #269048]: How can I have a script that works in both 1.0.1 and 1.1.0
Question #269048 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/269048 Pierre Best posted a new comment: try: import org.sikuli.basics.SikuliXforJython except ImportError: import org.sikuli.basics.SikulixForJython from sikuli import * -- You received this question notification because you are a member of Sikuli Drivers, which 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
[Sikuli-driver] [Bug 1463866] Re: Sikuli 1.1.0 tries to close my IDE
And it still send the Alt-F4 -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1463866 Title: Sikuli 1.1.0 tries to close my IDE Status in Sikuli: New Bug description: IntelliJ IDEA (Cassiopeia) IU-141.1383.1 JRE: 1.8.0_40-b26 x86 sikuli 1.1.0-20150602 Windows 8.1 Pro (x64) When my program calls close on an App object, it appears that sikuli is typing Alt-F4. Unfortunately this isn't going to the application, its going to the IDE, which then tries to close. It only fails because IDEA is configured to require confirmation before it will quit. The reason I believe it's sikuli is the following messages which are printed in the log: [log] ( Alt ) TYPE "#F4." [error] App.close [-1:myapp.exe ( Y - [Zz Z Zz])] C:\subversion\Sikuli\Myapp\test.sikuli\myapp.exe did not work To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1463866/+subscriptions ___ 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
[Sikuli-driver] [Bug 1463866] Re: Sikuli 1.1.0 tries to close my IDE
Sorry but constructing the App object before calling open() doesn't work. Creating an App object starts the application. -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1463866 Title: Sikuli 1.1.0 tries to close my IDE Status in Sikuli: New Bug description: IntelliJ IDEA (Cassiopeia) IU-141.1383.1 JRE: 1.8.0_40-b26 x86 sikuli 1.1.0-20150602 Windows 8.1 Pro (x64) When my program calls close on an App object, it appears that sikuli is typing Alt-F4. Unfortunately this isn't going to the application, its going to the IDE, which then tries to close. It only fails because IDEA is configured to require confirmation before it will quit. The reason I believe it's sikuli is the following messages which are printed in the log: [log] ( Alt ) TYPE "#F4." [error] App.close [-1:myapp.exe ( Y - [Zz Z Zz])] C:\subversion\Sikuli\Myapp\test.sikuli\myapp.exe did not work To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1463866/+subscriptions ___ 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 #269048]: How can I have a script that works in both 1.0.1 and 1.1.0
Question #269048 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/269048 Description changed to: I've got a script which has to work in 1.0.1 and 1.1.0. My problem is that the "import org.sikuli.basics.SikuliXforJython" statement in 1.0.1 has changed to "import org.sikuli.basics.SikulixForJython" in 1.1.0 ("Xf" -> "xF"). I'm looking at using importlib.import_module but wondered if there was a better way to do this -- You received this question notification because you are a member of Sikuli Drivers, which 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 #269048]: How can I have a script that works in both 1.0.1 and 1.1.0
Question #269048 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/269048 Status: Open => Solved Pierre Best confirmed that the question is solved: Ignore this question. I'm just going to do each import inside try: except: statements -- You received this question notification because you are a member of Sikuli Drivers, which 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
[Sikuli-driver] [Question #269048]: How can I have a script that works in both 1.0.1 and 1.1.0
New question #269048 on Sikuli: https://answers.launchpad.net/sikuli/+question/269048 I've got a script which has to work in 1.0.1 and 1.1.0. My problem is that the "import org.sikuli.basics.SikuliXforJython" statement in 1.0.1 has changed to "import org.sikuli.basics.SikulixForJython" in 1.0.1 ("Xf" -> "xF"). I'm looking at using importlib.import_module but wondered if there was a better way to do this -- You received this question notification because you are a member of Sikuli Drivers, which 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
[Sikuli-driver] [Bug 1463866] Re: Sikuli 1.1.0 tries to close my IDE
Any progress with this? -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1463866 Title: Sikuli 1.1.0 tries to close my IDE Status in Sikuli: New Bug description: IntelliJ IDEA (Cassiopeia) IU-141.1383.1 JRE: 1.8.0_40-b26 x86 sikuli 1.1.0-20150602 Windows 8.1 Pro (x64) When my program calls close on an App object, it appears that sikuli is typing Alt-F4. Unfortunately this isn't going to the application, its going to the IDE, which then tries to close. It only fails because IDEA is configured to require confirmation before it will quit. The reason I believe it's sikuli is the following messages which are printed in the log: [log] ( Alt ) TYPE "#F4." [error] App.close [-1:myapp.exe ( Y - [Zz Z Zz])] C:\subversion\Sikuli\Myapp\test.sikuli\myapp.exe did not work To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1463866/+subscriptions ___ 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
[Sikuli-driver] [Bug 1463866] Re: Sikuli 1.1.0 tries to close my IDE
** Description changed: IntelliJ IDEA (Cassiopeia) IU-141.1383.1 JRE: 1.8.0_40-b26 x86 sikuli 1.1.0-20150602 Windows 8.1 Pro (x64) When my program calls close on an App object, it appears that sikuli is - type Alt-F4. Unfortunately this isn't going to the application, its + typing Alt-F4. Unfortunately this isn't going to the application, its going to the IDE, which then tries to close. It only fails because IDEA is configured to require confirmation before it will quit. The reason I believe it's sikuli is the following messages which are printed in the log: [log] ( Alt ) TYPE "#F4." [error] App.close [-1:myapp.exe ( Y - [Zz Z Zz])] C:\subversion\Sikuli\Myapp\test.sikuli\myapp.exe did not work -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1463866 Title: Sikuli 1.1.0 tries to close my IDE Status in Sikuli: New Bug description: IntelliJ IDEA (Cassiopeia) IU-141.1383.1 JRE: 1.8.0_40-b26 x86 sikuli 1.1.0-20150602 Windows 8.1 Pro (x64) When my program calls close on an App object, it appears that sikuli is typing Alt-F4. Unfortunately this isn't going to the application, its going to the IDE, which then tries to close. It only fails because IDEA is configured to require confirmation before it will quit. The reason I believe it's sikuli is the following messages which are printed in the log: [log] ( Alt ) TYPE "#F4." [error] App.close [-1:myapp.exe ( Y - [Zz Z Zz])] C:\subversion\Sikuli\Myapp\test.sikuli\myapp.exe did not work To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1463866/+subscriptions ___ 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
[Sikuli-driver] [Bug 1463866] Re: Sikuli 1.1.0 tries to close my IDE
def start_app(path_to_app, window_title): p = os.path.normpath(path_to_app) if not os.path.exists(p): die('cannot find "%s": expected -> %s' % (window_title, p)) app = App.open(p) if not app: die('cannot start %s' % window_title) ... then more stuff that waits for the window to appear on the screen ... return app -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1463866 Title: Sikuli 1.1.0 tries to close my IDE Status in Sikuli: New Bug description: IntelliJ IDEA (Cassiopeia) IU-141.1383.1 JRE: 1.8.0_40-b26 x86 sikuli 1.1.0-20150602 Windows 8.1 Pro (x64) When my program calls close on an App object, it appears that sikuli is type Alt-F4. Unfortunately this isn't going to the application, its going to the IDE, which then tries to close. It only fails because IDEA is configured to require confirmation before it will quit. The reason I believe it's sikuli is the following messages which are printed in the log: [log] ( Alt ) TYPE "#F4." [error] App.close [-1:myapp.exe ( Y - [Zz Z Zz])] C:\subversion\Sikuli\Myapp\test.sikuli\myapp.exe did not work To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1463866/+subscriptions ___ 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
[Sikuli-driver] [Bug 1463866] Re: Sikuli 1.1.0 tries to close my IDE
Reproduces with 1.1.0-20150610 -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1463866 Title: Sikuli 1.1.0 tries to close my IDE Status in Sikuli: New Bug description: IntelliJ IDEA (Cassiopeia) IU-141.1383.1 JRE: 1.8.0_40-b26 x86 sikuli 1.1.0-20150602 Windows 8.1 Pro (x64) When my program calls close on an App object, it appears that sikuli is type Alt-F4. Unfortunately this isn't going to the application, its going to the IDE, which then tries to close. It only fails because IDEA is configured to require confirmation before it will quit. The reason I believe it's sikuli is the following messages which are printed in the log: [log] ( Alt ) TYPE "#F4." [error] App.close [-1:myapp.exe ( Y - [Zz Z Zz])] C:\subversion\Sikuli\Myapp\test.sikuli\myapp.exe did not work To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1463866/+subscriptions ___ 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 #267905]: Can't make PyCharm run sikuli scripts
Question #267905 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/267905 Pierre Best posted a new comment: As another datapoint, I'm running IntelliJ IDEA Ultimate + Python plugin and setting CLASSPATH to point at sikulixapi.jar works for me. -- You received this question notification because you are a member of Sikuli Drivers, which 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
[Sikuli-driver] [Bug 1463866] [NEW] Sikuli 1.1.0 tries to close my IDE
Public bug reported: IntelliJ IDEA (Cassiopeia) IU-141.1383.1 JRE: 1.8.0_40-b26 x86 sikuli 1.1.0-20150602 Windows 8.1 Pro (x64) When my program calls close on an App object, it appears that sikuli is type Alt-F4. Unfortunately this isn't going to the application, its going to the IDE, which then tries to close. It only fails because IDEA is configured to require confirmation before it will quit. The reason I believe it's sikuli is the following messages which are printed in the log: [log] ( Alt ) TYPE "#F4." [error] App.close [-1:myapp.exe ( Y - [Zz Z Zz])] C:\subversion\Sikuli\Myapp\test.sikuli\myapp.exe did not work ** Affects: sikuli Importance: Undecided Status: New -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1463866 Title: Sikuli 1.1.0 tries to close my IDE Status in Sikuli: New Bug description: IntelliJ IDEA (Cassiopeia) IU-141.1383.1 JRE: 1.8.0_40-b26 x86 sikuli 1.1.0-20150602 Windows 8.1 Pro (x64) When my program calls close on an App object, it appears that sikuli is type Alt-F4. Unfortunately this isn't going to the application, its going to the IDE, which then tries to close. It only fails because IDEA is configured to require confirmation before it will quit. The reason I believe it's sikuli is the following messages which are printed in the log: [log] ( Alt ) TYPE "#F4." [error] App.close [-1:myapp.exe ( Y - [Zz Z Zz])] C:\subversion\Sikuli\Myapp\test.sikuli\myapp.exe did not work To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1463866/+subscriptions ___ 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 #261426]: Region.observe(60, True) is throwing an exception
Question #261426 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/261426 Pierre Best posted a new comment: Configuration Information: == Adding sys.__stdout__.write('[X] python version: %s\n' % platform.python_version()) sys.__stdout__.write('[X] java version: %s\n' % list(platform.java_ver())) sys.__stdout__.write('[X] python path: %s\n' % sys.executable) sys.__stdout__.write('[X] encoding: %s\n' % sys.stdout.encoding) sys.__stdout__.write('[X] default encoding: %s\n' % sys.getdefaultencoding()) sys.__stdout__.write('[X] _classpath: [\n\t%s\n]\n' % ("\n\t".join(["<{0}>".format(path_to_add) for path_to_add in map(lambda url: url.getFile(), ClassLoader.getSystemClassLoader().getURLs())]))) sys.__stdout__.write('[X] sys.path: [\n\t%s\n]\n' % ("\n\t".join(["<{0}>".format(path_to_add) for path_to_add in sys.path]))) to the start of the program gives the following output [X] python version: 2.7.0 [X] java version: ['1.8.0_20', 'Oracle Corporation', ('Java HotSpot(TM) 64-Bit Server VM', '25.20-b23', 'Oracle Corporation'), ('Windows 8.1', '6.3', 'amd64')] [X] python path: C:\git\AlphaPack2\jython\2.7b3\jython.bat [X] encoding: UTF-8 [X] default encoding: ascii [X] _classpath: [ ] [X] sys.path: [ <__classpath__> <__pyclasspath__/> ] -- You received this question notification because you are a member of Sikuli Drivers, which 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 #261426]: Region.observe(60, True) is throwing an exception
Question #261426 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/261426 Pierre Best posted a new comment: import org.sikuli.basics.SikulixForJython from sikuli import * Settings.OcrTextSearch = True Settings.OcrTextRead = True _changes = [] def change_handler(event): global _changes for ec in event.changes: _changes.append(Region(ec)) _changes.append(None) event.region.stopObserver() def detect_menu_appear(): _APP = 'notepad.exe' _TITLE = 'Notepad' _MENU_TITLE = 'Edit' try: np = App(_APP) np.open() for _ in range(10): mw = np.window(0) if mw: break time.sleep(0.1) if not mw: exit() title = None try: title = mw.find(_TITLE) except Sikuli.FindFailed: exit() if title is None: exit() if title.click(title) != 1: exit() edit_menu = None try: edit_menu = mw.find(_MENU_TITLE) except Sikuli.FindFailed: exit() if edit_menu is None: exit() menu_region = edit_menu.left(1).below().right().intersection(mw) menu_region.onChange(100, change_handler) global _changes _changes = [] menu_region.observe(60, True) if edit_menu.click(edit_menu) != 1: exit() for _ in range(20): # wait for the handler to terminate if len(_changes) == 0: time.sleep(1) continue for r in _changes[:-1]: sys.__stdout__.write('<%s>' % r) except: sei0, sei1 = sys.exc_info()[:2] sys.__stdout__.write('except->[<%s>, <%s>]\n' % (sei0, sei1)) pass finally: np.close() detect_menu_appear() -- You received this question notification because you are a member of Sikuli Drivers, which 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
[Sikuli-driver] [Question #261426]: Region.observe(60, True) is throwing an exception
New question #261426 on Sikuli: https://answers.launchpad.net/sikuli/+question/261426 Sikuli 1.1.0 I'm trying to track the sub-menu that appears when you click on a menu name. I've set up the handler and assigned it with onChange() but when I call r.observe(60, True) an exception is thrown. Printing the exception type and message gives the following information: , observe(): expected 0-1 args; got 2 I need the observe() to run in the background as the script will also be generating the click so calling observe(60) won't work. Here's the complete log === C:\git\AlphaPack2\jython\2.7b3\jython.bat -Dsikuli.Debug=3 "-Dpython.path=C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs;C:\Users\pierreb\PycharmProjects\detect_region\sikuli\sikulixapi.jar;C:\Users\pierreb\PycharmProjects\detect_region\sikuli\Lib;C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0\helpers\pycharm;C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0\helpers\pydev;C:\Users\pierreb\PycharmProjects\detect_region\dr" "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0\helpers\pydev\pydevd.py" --multiproc --client 127.0.0.1 --port 51740 --file C:/Users/pierreb/PycharmProjects/detect_region/dr/main.py Failed to get import name for name _codecs.class pydev debugger: process 6544 is connecting Failed to get import name for name thread.class Failed to get import name for name _codecs.class Connected to pydev debugger (build 139.1001) Jan 30, 2015 11:45:39 AM java.util.prefs.WindowsPreferences WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x8002. Windows RegCreateKeyEx(...) returned error code 5. [debug] SikuliXforJython: sys.path[0]: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs [debug] SikuliXforJython: sys.path[1]: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\sikulixapi.jar [debug] SikuliXforJython: sys.path[2]: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\Lib [error] Sikuli Jython API already on sys.path, but not at sikulixapi.jar/Lib [error] Found here: C:/Users/pierreb/PycharmProjects/detect_region/sikuli/Lib/ [debug] Jython: sikuli: Sikuli: starting init Failed to get import name for name FindFailedResponse.class Failed to get import name for name FindFailedResponse.declaringClass Failed to get import name for name Constants.class Failed to get import name for name Constants.class [debug] ResourceLoader: SikuliX Package Build: 1.1.0 2015-01-16_01:00nightly [debug] ResourceLoader: check: we are running on arch: amd64 [debug] ResourceLoader: check: using Java at: C:/Program Files/Java/jre1.8.0_20/ [debug] ResourceLoader: check: Exists libs folder at location of jar? YES: C:/Users/pierreb/PycharmProjects/detect_region/sikuli/ [debug] ResourceLoader: checkLibsDir: trying: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs [debug] ResourceLoader: checkLibsDir: Running on Windows - checking system path! [debug] ResourceLoader: checkLibsDir: Added libs dir to path: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs [debug] ResourceLoader: checkLibsDir: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs;C:\ProgramData\Oracle\Java\javapath;C:\Apps\oracl... [debug] ResourceLoader: checkLibsDir: checking ClassLoader.usrPaths having: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs [debug] ResourceLoader: checkLibsDir: added to ClassLoader.usrPaths [debug] ResourceLoader: loadLib: Now loaded: VisionProxy from: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs\VisionProxy.dll [debug] ResourceLoader: checkLibsDir: Using libs at: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs [debug] Screen: initScreens: ScreenDevice 0 contains (0,0) --- will be used as primary [debug] Screen: initScreens: basic initialization (1 Screen(s) found) [debug] Screen: *** monitor configuration (primary: 0) *** [debug] Screen: 0: S(0)[0,0 1920x1080] [debug] Screen: *** end monitor configuration *** [debug] Mouse: init [debug] KeyBoard: init [debug] ResourceLoader: loadLib: Now loaded: WinUtil from: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs\WinUtil.dll [debug] Jython: requested to use as default region: R[0,0 1920x1080]@S(0) [debug] Jython: sikuli: Sikuli: ending init [log] App.open notepad.exe(10836) [debug] Region: find: waiting 3.0 secs for Edit to appear in R[189,95 851x782]@S(0) [error] ImagePath: setBundlePath: invalid BundlePath: null using working folder: C:\Users\pierreb\PycharmProjects\detect_region\dr [debug] ImagePath: new BundlePath: C:/Users/pierreb/PycharmProjects/detect_region/dr [error] Image: could not be loaded: file:C:\Users\pierreb\PycharmProjects\detect_region\dr\Edit.png [debug] TextRecognizer: init OK: using as data folder: C:\Users\pierreb\PycharmProjects\detect_region\sikuli\libs\tessdata [debug] Region: doFind: Switching to TextSearch [debug] Region: find: Edit has appeared at M[509,144 19x9]@S(S(0)[0,0 1920x1080]
Re: [Sikuli-driver] [Question #255035]: [1.1.0] PyCharm: sikulixapi not working
Question #255035 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/255035 Pierre Best posted a new comment: Comment #8 was only posted just in case any one else needed to get PyCharm/Sikuli working. It wasn't a statement that I still had a problem. That was why I put FYI at the top of the message. Maybe I shouldn't have bothered. If you like I can hide the message so that no one else can see it and no further confusion will occur. I am not doing individual imports any more and have removed all of those from my code; I'm now doing it the way you recommended. I'll try your suggestion about code completion. -- You received this question notification because you are a member of Sikuli Drivers, which 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 #255035]: [1.1.0] PyCharm: sikulixapi not working
Question #255035 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/255035 Pierre Best posted a new comment: FYI My PyCharm/Sikuli configuration Installed Apps == Java: JDK 1.8.0_20 in default installation dir Jython: 2.7b3 Pycharm: 3.4.1 (also seems to work with 4.0 EAP) Sikulix: 1.1.0 nightly build (2014-09-25) Pycharm Settings Project Interpreter: jython.bat in jython install dir Project Structure: +Add Content Root: sikulixapi.jar in sikulix directory Run/Debug Configurations: Environment Variables: CLASSPATH set to path to sikulixapi.jar in sikulix directory Add content roots to PYTHONPATH: clear checkbox Add source roots to PYTHONPATH: clear checkbox Outstanding PyCharm problems Code completion/intellisense doesn't work properly for sikuli stuff. Classes are marked as unrecognised but if you attempt code completion against an object such as Region, the object's methods are displayed. This is niggly stuff since the code executes properly. -- You received this question notification because you are a member of Sikuli Drivers, which 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 #236725]: Why does onChange() work with a sikuli.Region and not with a org.sikuli.script.Region
Question #236725 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/236725 Pierre Best posted a new comment: My PyCharm/Sikuli configuration Installed Apps == Java: JDK 1.8.0_20 in default installation dir Jython: 2.7b3 Pycharm: 3.4.1 (also seems to work with 4.0 EAP) Sikulix: 1.1.0 nightly build (2014-09-25) Pycharm Settings Project Interpreter: jython.bat in jython install dir Project Structure: +Add Content Root: sikulixapi.jar in sikulix directory Run/Debug Configurations: Environment Variables: CLASSPATH set to path to sikulixapi.jar in sikulix directory Add content roots to PYTHONPATH: clear checkbox Add source roots to PYTHONPATH: clear checkbox Outstanding PyCharm problems Code completion/intellisense doesn't work properly for sikuli stuff. Classes are marked as unrecognised but if you attempt code completion against an object such as Region, the object's methods are displayed. This is niggly stuff since the code executes properly. -- You received this question notification because you are a member of Sikuli Drivers, which 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 #255035]: [1.1.0] PyCharm: sikulixapi not working
Question #255035 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/255035 Pierre Best posted a new comment: Previously we had to do if __name__ == '__main__': import org.sikuli.basics.SikulixForJython Sorry if I was unclear. -- You received this question notification because you are a member of Sikuli Drivers, which 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 #255035]: [1.1.0] PyCharm: sikulixapi not working
Question #255035 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/255035 Status: Answered => Solved Pierre Best confirmed that the question is solved: Thanks RaiMan, that solved my question. -- You received this question notification because you are a member of Sikuli Drivers, which 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 #255035]: [1.1.0] PyCharm: sikulixapi not working
Question #255035 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/255035 Pierre Best posted a new comment: Do we no longer have to put a guard around the import SikulixForJython? -- You received this question notification because you are a member of Sikuli Drivers, which 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
[Sikuli-driver] [Question #255035]: I can't get 1.1.0 nightly sikulixapi working within PyCharm
New question #255035 on Sikuli: https://answers.launchpad.net/sikuli/+question/255035 I'm trying to use PyCharm for the latest build of 1.1.0. I've got a small program which highlights an area of the screen which executes properly in the Sikuli IDE. (I'm only dumping the environment, path, etc for debugging purposes) import os import sys cwd = os.getcwd() if cwd: print "cwd: %s" % (cwd) print "env:" for e in os.environ: print "\t%s=%s" % (e, os.environ[e]) if not cwd in sys.path: sys.path.insert(1, cwd) print "added path: %s" % (cwd) _SX_DIR = r'c:\users\pierreb\downloads\sx110-140925' print "sys.path: [\n\t%s\n]" % ("\n\t".join(["{0}".format(dir_path) for dir_path in sys.path if dir_path])) from java.lang import ClassLoader cl = ClassLoader.getSystemClassLoader() class_path = map(lambda url: url.getFile(), cl.getURLs()) print "classpath: %s" % class_path from sikuli import Screen from sikuli import Region if __name__ == '__main__': import org.sikuli.script.SikulixForJython r = Region(200,200,300,300) r.highlight(5) When I run it in PyCharm it fails with the following error. Any help would be appreciated C:\Apps\jython\2.7b3\jython.bat -Dsikuli.Debug=3 "-Dpython.path=C:\Program Files (x86)\JetBrains\PyCharm Community Edition 3.4.1\helpers\pydev;C:\Users\pierreb\Downloads\sx110-140925\sikulixapi.jar;C:\Program Files (x86)\JetBrains\PyCharm Community Edition 3.4.1\helpers\pycharm;C:\Users\pierreb\PycharmProjects\first;C:\Users\pierreb\Downloads\sx110-140925\Lib;C:\Users\pierreb\Downloads\sx110-140925\libs" "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 3.4.1\helpers\pydev\pydevd.py" --multiproc --client 127.0.0.1 --port 53565 --file C:/Users/pierreb/PycharmProjects/first/pp/simple.py pydev debugger: process 8168 is connecting Connected to pydev debugger (build 135.1057) cwd: C:\Users\pierreb\PycharmProjects\first\pp env: PATH=C:\ProgramData\Oracle\Java\javapath;C:\Apps\oracle\product\12.1.0\client_1;C:\Apps\oracle\product\12.1.0\client_1\bin;C:\apps\oracle\product\12.1.0\dbhome_2\bin;C:\apps\client\pierreb\product\12.1.0\client_1\bin;C:\Program Files (x86)\AMD APP\bin\x86_64;c:\Program Files (x86)\Intel\iCLS Client\;c:\Program Files\Intel\iCLS Client\;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\1 10\DTS\Binn\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Git\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Apps\chocolatey\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\Java\jre8\bin;C:\Apps\apache-maven-3.1.1\bin;C:\Apps\bin;C:\Program Files (x86)\Notepad++;C:\Program Files (x86)\LLVM\bin SYSTEMDRIVE=C: PROCESSOR_LEVEL=6 _PERCENT=% _JAVA_MEM=-Xmx512m FP_NO_HOST_CHECK=NO SESSIONNAME=Console ALLUSERSPROFILE=C:\ProgramData PROCESSOR_ARCHITECTURE=x86 _CP="C:\Apps\jython\2.7b3"\jython.jar VS100COMNTOOLS=c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\ MAVEN_HOME=C:\Apps\apache-maven-3.1.1 PROGRAMFILES=C:\Program Files (x86) PSMODULEPATH=C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\ PROGRAMDATA=C:\ProgramData USERNAME=pierreb JDK_HOME=C:\Program Files (x86)\Java\jdk1.8.0_20 PYCHARM_HOSTED=1 PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC PROCESSOR_ARCHITEW6432=AMD64 _EXCLAMATION=! _JAVA_CMD="C:\Program Files (x86)\Java\jdk1.8.0_20\bin\java" JYTHONPATH=C:\Program Files (x86)\JetBrains\PyCharm Community Edition 3.4.1\helpers\pydev;C:\Users\pierreb\Downlo
Re: [Sikuli-driver] [Question #236725]: Why does onChange() work with a sikuli.Region and not with a org.sikuli.script.Region
Question #236725 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/236725 Status: Answered => Solved Pierre Best confirmed that the question is solved: Thanks RaiMan, that solved my question. -- You received this question notification because you are a member of Sikuli Drivers, which 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 #236725]: Why does onChange() work with a sikuli.Region and not with a org.sikuli.script.Region
Question #236725 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/236725 Status: Answered => Open Pierre Best is still having a problem: I've followed your instructions in steps 1, 2, 3 and 4. When I try to debug the program I get the following output: pydev debugger: starting [debug] SikuliXforJython: sys.path[0]: C:\Users\pierreb\Documents\alphapack test plan\sikuli-alphapack\AlphaPack.sikuli [debug] SikuliXforJython: sys.path[1]: C:\Users\pierreb\Downloads\sikuli\eclipse\eclipse\plugins\org.python.pydev_2.8.2.2013090511\pysrc [debug] SikuliXforJython: sys.path[2]: C:\Users\pierreb\Documents\alphapack test plan\sikuli-alphapack\AlphaPack.sikuli [debug] SikuliXforJython: sys.path[3]: C:\Users\pierreb\Documents\alphapack test plan\sikuli-alphapack\AlphaPack.sikuli\Application.jar [debug] SikuliXforJython: sys.path[4]: C:\Apps\sikuli-api-1.0.1\sikuli-java.jar [debug] SikuliXforJython: sys.path[5]: C:\Apps\sikuli-api-1.0.1\libs [debug] SikuliXforJython: sys.path[6]: C:\Apps\sikuli-api-1.0.1\libs\Lib [debug] SikuliXforJython: sys.path[7]: C:\Apps\jython\2.7b1\Lib [debug] SikuliXforJython: sys.path[8]: C:\Apps\jython\2.7b1\Lib\site-packages [debug] SikuliXforJython: sys.path[9]: __classpath__ [debug] SikuliXforJython: sys.path[10]: __pyclasspath__/ [debug] SikuliXforJython: found Sikuli Jython in: /C:/Apps/sikuli-api-1.0.1/sikuli-java.jar/Lib [debug] SikuliXforJython: Trying to add to sys.path [debug] SikuliXforJython: new Jython path: [debug] SikuliXforJython: sys.path[0]: C:\Users\pierreb\Documents\alphapack test plan\sikuli-alphapack\AlphaPack.sikuli [debug] SikuliXforJython: sys.path[1]: C:\Users\pierreb\Downloads\sikuli\eclipse\eclipse\plugins\org.python.pydev_2.8.2.2013090511\pysrc [debug] SikuliXforJython: sys.path[2]: C:\Users\pierreb\Documents\alphapack test plan\sikuli-alphapack\AlphaPack.sikuli [debug] SikuliXforJython: sys.path[3]: C:\Users\pierreb\Documents\alphapack test plan\sikuli-alphapack\AlphaPack.sikuli\Application.jar [debug] SikuliXforJython: sys.path[4]: C:\Apps\sikuli-api-1.0.1\sikuli-java.jar [debug] SikuliXforJython: sys.path[5]: C:\Apps\sikuli-api-1.0.1\libs [debug] SikuliXforJython: sys.path[6]: C:\Apps\sikuli-api-1.0.1\libs\Lib [debug] SikuliXforJython: sys.path[7]: C:\Apps\jython\2.7b1\Lib [debug] SikuliXforJython: sys.path[8]: C:\Apps\jython\2.7b1\Lib\site-packages [debug] SikuliXforJython: sys.path[9]: __classpath__ [debug] SikuliXforJython: sys.path[10]: __pyclasspath__/ [debug] SikuliXforJython: sys.path[11]: /C:/Apps/sikuli-api-1.0.1/sikuli-java.jar/Lib [debug] ResourceLoaderBasic: SikuliX Package Build: 1.0.1 12SEP2013135849 [debug] Jython: sikuli: __init__: entering [debug] Jython: sikuli: Sikuli: entering [debug] Jython: sikuli: Sikuli: constants [debug] Jython: sikuli: Sikuli: import Region [debug] Jython: sikuli: Sikuli: import Screen [debug] Jython: sikuli: Sikuli: Env.addHotkey [debug] Jython: sikuli: Sikuli: import Match [debug] Jython: sikuli: Sikuli: import Pattern [debug] Jython: sikuli: Sikuli: import Location [debug] Jython: sikuli: Sikuli: import ScreenUnion [debug] Jython: sikuli: Sikuli: import Finder [debug] ResourceLoaderBasic: check: we are running on arch: x86 [debug] ResourceLoaderBasic: check: using Java at: C:/Program Files (x86)/Java/jdk1.7.0_40/jre/ [debug] ResourceLoaderBasic: check: Exists libs folder at location of jar? YES: C:/Apps/sikuli-api-1.0.1/ [debug] ResourceLoaderBasic: checkLibsDir: C:/Apps/sikuli-api-1.0.1/libs [error] ResourceLoaderBasic: checkLibsDir: libs dir is not on system path: C:\Apps\sikuli-api-1.0.1\libs C:\Windows\system32 C:\Windows C:\Apps\Sikuli-api-1.0.1\libs\ C:\Apps\Sikuli-api-1.0.1\libs\Lib\ C:\Program Files (x86)\Java\jdk1.7.0_40\jre\bin [action] ResourceLoaderBasic: checkLibsDir: Please wait! Trying to add it to user's path [debug] ResourceLoaderBasic: runcmd: reg QUERY HKCU [info] runcmd: reg QUERY HKCU [debug] ResourceLoaderBasic: runcmd: reg QUERY HKEY_CURRENT_USER\Environment /v PATH [info] runcmd: reg QUERY HKEY_CURRENT_USER\Environment /v PATH [debug] ResourceLoaderBasic: checkLibsDir: current:(HKEY_CURRENT_USER\Environment PATH): C:\Apps\sikuli-api-1.0.1\libs;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;%JYTHON_HOME%;%JYTHON_HOME%\bin;%SIKULI_HOME%;%SIKULI_HOME%\libs [error] ResourceLoaderBasic: checkLibsDir: Logout and Login again! (Since libs folder is in user's path, but not activated) [error] Terminating SikuliX after a fatal error! Sorry, but it makes no sense to continue! If you do not have any idea about the error cause or solution, run again with a Debug level of 3. You might paste the output to the Q&A board. [debug] SikuliXFinal: cleanUp: 0 Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8 -- You received this question notification because you are a member of Sikuli Drivers, which is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driv
[Sikuli-driver] [Question #236725]: Why does onChange() work with a sikuli.Region and not with a org.sikuli.script.Region
New question #236725 on Sikuli: https://answers.launchpad.net/sikuli/+question/236725 I'm using Eclipse, Sikuli-API-1.0.0-Win32 and jython 2.7b1 to script some tests. I wanted to set up an observer but everytime I tried to set up the handler with Region.onChange() it would fail with the error invalid Region - use r = Region(r) before as workaround [error] observe(): Nothing to observe (for Jython: region might be invalid) I finally tracked the problem down to the fact that I'd been using org.sikuli.script.Region rather than sikuli.Region. In fact all my imports are from org.sikuli.script but I haven't had any problems up until now. Should I be importing objects from sikuil rather than org.sikuli.script? -- You received this question notification because you are a member of Sikuli Drivers, which 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