Re: [Sikuli-driver] [Question #692555]: Python module
Question #692555 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/692555 Description changed to: Found solution :) -- 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 #692555]: Python module
Question #692555 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/692555 Status: Open => Solved xyz_User confirmed that the question is solved: found the problem -- 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
[Sikuli-driver] [Question #692555]: Python module
New question #692555 on Sikuli: https://answers.launchpad.net/sikuli/+question/692555 Is there any way to import this PIL module that's missing? Actually i can't even find this module anywhere to download :( What im trying achieve is to get the RGB value at x,y coordinates and if the value matches do something, or is there a better way this is what took from a stackoverflow user: https://i.ibb.co/w6vn2GY/module.png -- 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 #692503]: Custom image path for 1 function
Question #692503 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/692503 Status: Answered => Solved xyz_User 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 #692550]: IDE crash when OCR does not find anything. Only 272 unsuccessful calls of text() possible
Question #692550 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/692550 Status: Answered => Open Michael Böhm is still having a problem: Dear RaiMan, sorry for bothering you. I am still sure this is a bug, as I can reproduce any time. In regards to your questions: -- crash: I called it crash. Whatever it is: I cannot stop it with the hotkey (alt+shift+C). only killing JAVA from taskmanager works -- Here the missing function: def ExtractAlphanumeric_all(InputString): from string import ascii_letters, digits return "".join([ch for ch in InputString if ch in (ascii_letters + digits +" ()*"+"äöüÄÖÜß")]) -- I need to shrink the region, because my experience over years with Sikulix is, that in case text is not found, a region with smaller size (less empty space around the text) works much better. This is why I start trying to get the text with the biggest size first, and then slowly decreasing it. Nevertheless. In my original ticket I added a lot of debug information, which was describing exactly what leads to the bug. All comments disappeart obviously when you moved it to a "question". Short summary of what I wrote in my original ticket: it can be reproduced, a simple loop with getting text causes the same error, and it depends on the pattern of the picture how soon it crashes. Regards MIchael 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 #692550]: IDE crash when OCR does not find anything. Only 272 unsuccessful calls of text() possible
Question #692550 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/692550 Status: Open => Answered RaiMan proposed the following answer: a better version of your snippet: def text_shrink(Reg): # continously decrease region until OCR gets a match texts="" Reg=Reg.grow(30,30,0,0) while texts == "" and Reg.getW()>61: Reg=Reg.grow(-30,-30,0,0) texts=ExtractAlphanumeric_all(Reg.text()).strip() #crash here on OCR return texts --- I cannot see any information about a "crash" (besides that the script does not come back) --- your function ExtractAlphanumeric_all() might have problems (endless loop?) --- generally it does not make sense to shrink a region, that does not have text, to eventually find text in the shrinked region. -- 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 #692550]: IDE crash when OCR does not find anything. Only 272 unsuccessful calls of text() possible
Question #692550 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/692550 Removed link to bug: #1892161 https://bugs.launchpad.net/bugs/1892161 "IDE crash when OCR does not find anything. Only 272 unsuccessful calls of text() possible" -- 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
[Sikuli-driver] [Bug 1892161] Re: IDE crash when OCR does not find anything. Only 272 unsuccessful calls of text() possible
should first be a question ** Changed in: sikuli Status: New => Invalid ** Converted to question: https://answers.launchpad.net/sikuli/+question/692550 -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1892161 Title: IDE crash when OCR does not find anything. Only 272 unsuccessful calls of text() possible Status in Sikuli: Invalid Bug description: Hi! I am using Sikulix 2.0.4 on Windows 10 64bit, JAVA 11, 2 large sized Monitors (3440x1440 + 2560x1440 as one display, NVIDIA). Sikulix crashes (meaning: it does not process anymore, does not write logfiles, ALT-SHIFT-C does not work, JAVA needs to be killed in taskmanager to restart sikulix) within following function in about 1 of 10 cases. only when it tries to OCR read text in an area where there is no text: def text_shrink(Reg): # continously decrease region until OCR gets a match texts=False Reg=Reg.grow(30,30,0,0) while (texts==False or len(texts)<=2) and Reg.getW()>20: Reg=Reg.grow(-30,-30,0,0) texts=ExtractAlphanumeric_all(Reg.text()).strip()#crash here on OCR return texts The images for this particular run where the crash happend is attached. Here the debug log (4): [debug (19.08.20, 10:33:21)] RunTime:loadlib: trying opencv_java342 [debug (19.08.20, 10:33:21)] RunTime:loadLib: opencv_java342.dll already loaded [debug (19.08.20, 10:33:21)] OCR: start: Tess4J 4.4.1 using Tesseract 4.1.0 [debug (19.08.20, 10:33:21)] RobotDesktop: captureScreen: [824,1291, 224x67] [debug (19.08.20, 10:33:21)] Image: BufferedImage: (224, 67) [debug (19.08.20, 10:33:21)] Image: getImage inMemory: __BufferedImage__ [debug (19.08.20, 10:33:21)] Finder2: makeMat: INT_RGB (224x67) [debug (19.08.20, 10:33:21)] RunTime:loadlib: trying opencv_java342 [debug (19.08.20, 10:33:21)] RunTime:loadLib: opencv_java342.dll already loaded [debug (19.08.20, 10:33:21)] OCR: start: Tess4J 4.4.1 using Tesseract 4.1.0 [debug (19.08.20, 10:33:21)] RobotDesktop: captureScreen: [854,1291, 164x67] [debug (19.08.20, 10:33:21)] Image: BufferedImage: (164, 67) [debug (19.08.20, 10:33:21)] Image: getImage inMemory: __BufferedImage__ [debug (19.08.20, 10:33:21)] Finder2: makeMat: INT_RGB (164x67) [debug (19.08.20, 10:33:21)] RunTime:loadlib: trying opencv_java342 [debug (19.08.20, 10:33:21)] RunTime:loadLib: opencv_java342.dll already loaded [debug (19.08.20, 10:33:21)] OCR: start: Tess4J 4.4.1 using Tesseract 4.1.0 [debug (19.08.20, 10:33:21)] RobotDesktop: captureScreen: [884,1291, 104x67] [debug (19.08.20, 10:33:21)] Image: BufferedImage: (104, 67) [debug (19.08.20, 10:33:21)] Image: getImage inMemory: __BufferedImage__ [debug (19.08.20, 10:33:21)] Finder2: makeMat: INT_RGB (104x67) [debug (19.08.20, 10:41:22)] IDE: AbortKey was pressed: aborting all running scripts [debug (19.08.20, 10:41:31)] IDE: AbortKey was pressed: aborting all running scripts [debug (19.08.20, 10:43:19)] IDE: AbortKey was pressed: aborting all running scripts [debug (19.08.20, 10:43:20)] IDE: AbortKey was pressed: aborting all running scripts Thanks a lot Michael To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1892161/+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 #692550]: IDE crash when OCR does not find anything. Only 272 unsuccessful calls of text() possible
Question #692550 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/692550 RaiMan posted a new comment: should first be a 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
[Sikuli-driver] [Question #692550]: IDE crash when OCR does not find anything. Only 272 unsuccessful calls of text() possible
New question #692550 on Sikuli: https://answers.launchpad.net/sikuli/+question/692550 Hi! I am using Sikulix 2.0.4 on Windows 10 64bit, JAVA 11, 2 large sized Monitors (3440x1440 + 2560x1440 as one display, NVIDIA). Sikulix crashes (meaning: it does not process anymore, does not write logfiles, ALT-SHIFT-C does not work, JAVA needs to be killed in taskmanager to restart sikulix) within following function in about 1 of 10 cases. only when it tries to OCR read text in an area where there is no text: def text_shrink(Reg): # continously decrease region until OCR gets a match texts=False Reg=Reg.grow(30,30,0,0) while (texts==False or len(texts)<=2) and Reg.getW()>20: Reg=Reg.grow(-30,-30,0,0) texts=ExtractAlphanumeric_all(Reg.text()).strip()#crash here on OCR return texts The images for this particular run where the crash happend is attached. Here the debug log (4): [debug (19.08.20, 10:33:21)] RunTime:loadlib: trying opencv_java342 [debug (19.08.20, 10:33:21)] RunTime:loadLib: opencv_java342.dll already loaded [debug (19.08.20, 10:33:21)] OCR: start: Tess4J 4.4.1 using Tesseract 4.1.0 [debug (19.08.20, 10:33:21)] RobotDesktop: captureScreen: [824,1291, 224x67] [debug (19.08.20, 10:33:21)] Image: BufferedImage: (224, 67) [debug (19.08.20, 10:33:21)] Image: getImage inMemory: __BufferedImage__ [debug (19.08.20, 10:33:21)] Finder2: makeMat: INT_RGB (224x67) [debug (19.08.20, 10:33:21)] RunTime:loadlib: trying opencv_java342 [debug (19.08.20, 10:33:21)] RunTime:loadLib: opencv_java342.dll already loaded [debug (19.08.20, 10:33:21)] OCR: start: Tess4J 4.4.1 using Tesseract 4.1.0 [debug (19.08.20, 10:33:21)] RobotDesktop: captureScreen: [854,1291, 164x67] [debug (19.08.20, 10:33:21)] Image: BufferedImage: (164, 67) [debug (19.08.20, 10:33:21)] Image: getImage inMemory: __BufferedImage__ [debug (19.08.20, 10:33:21)] Finder2: makeMat: INT_RGB (164x67) [debug (19.08.20, 10:33:21)] RunTime:loadlib: trying opencv_java342 [debug (19.08.20, 10:33:21)] RunTime:loadLib: opencv_java342.dll already loaded [debug (19.08.20, 10:33:21)] OCR: start: Tess4J 4.4.1 using Tesseract 4.1.0 [debug (19.08.20, 10:33:21)] RobotDesktop: captureScreen: [884,1291, 104x67] [debug (19.08.20, 10:33:21)] Image: BufferedImage: (104, 67) [debug (19.08.20, 10:33:21)] Image: getImage inMemory: __BufferedImage__ [debug (19.08.20, 10:33:21)] Finder2: makeMat: INT_RGB (104x67) [debug (19.08.20, 10:41:22)] IDE: AbortKey was pressed: aborting all running scripts [debug (19.08.20, 10:41:31)] IDE: AbortKey was pressed: aborting all running scripts [debug (19.08.20, 10:43:19)] IDE: AbortKey was pressed: aborting all running scripts [debug (19.08.20, 10:43:20)] IDE: AbortKey was pressed: aborting all running scripts Thanks a lot Michael -- 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 #692519]: findChanges has no function
Question #692519 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/692519 Status: Open => Answered RaiMan proposed the following answer: --- does not highlight the word "findChanges" This is because the word is missing in the respective IDE support file (as many other features) Relevant is, whether something like someRegionOrWhatever.someFunction() does not lead to a name error. --- this is a findChanges test on Windows having the page https://github.com/RaiMan open in Google Chrome and triggering changes by selecting a different tab App.focus("Google Chrome") wait(2) #observe area in app window reg = App.focusedWindow() reg = reg.grow(-10, -540, -150, -30) reg.highlight(1) # put the app window in an startup state if not reg.has("1598188841340.png"): btnOver = "btnOver.png" reg.click(btnOver) reg.wait("1598188674947.png", 10) # capture startup state img1 = capture(reg) # chnage the content in the observed area btnRepo = "img.png" reg.click(btnRepo) reg.wait("1598188724213.png", 10) # capture changed state img2 = capture(reg) # evaluate changes f = Finder(img1) changes = f.findChanges(img2) print "changes:", len(changes) changed = Region(0, 0, reg.w, reg.h) if len(changes) > 0: changed = changes[0] if len(changes) > 1: for change in changes[1:]: changed = changed.union(change) changed = Region(reg.x + changed.x, reg.y + changed.y, changed.w, changed.h) changed.highlight(2) The result is 29 changes, which result in a changed area union in the right side of the page (as expected). Hence, findChanges works as expected. Be aware: in the current implementation (which surely has to be enhanced ;-) this is the safest way: Finder(absolute-filename-string-base).findChanges(absolute-filename- string-changed) which in my testcase is assured by using capture(reg). -- 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 #692544]: Quarkus Extension for Sikuli --- currently (2020) no plans
Question #692544 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/692544 Status: Open => Answered RaiMan proposed the following answer: I do not have any plans currently towards GraalVM or even Quarkus, but feel free, to make suitable suggestions or even concept outlines on GitHub (https://github.com/RaiMan/SikuliNG) -- 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 #692544]: Quarkus Extension for Sikuli --- currently (2020) no plans
Question #692544 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/692544 Summary changed to: Quarkus Extension for Sikuli --- currently (2020) no plans -- 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 #692455]: [How to] Persistent Script
Question #692455 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/692455 Status: Open => Solved Javier Gonzales Rodriguez 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 #692455]: [How to] Persistent Script
Question #692455 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/692455 Status: Answered => Open Javier Gonzales Rodriguez is still having a problem: Hi there, now it is working way better. def MyHandler(event): try: Trade() pass except: pass msgReg.onAppear("1597989280191.png", MyHandler) msgReg.observeInBackground(FOREVER) msgReg.stopObserver() -- 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