Re: [Sikuli-driver] [Question #680652]: how to use Region.onChange in pyton with jpype
Question #680652 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680652 wu gave more information on the question: i do something but it not finish i find onchange and can use but it not return something my method : Jappeared = ObserverCallBack.appeared def change(event): print('change') class Appeared(Jappeared): pass this class can override the father Jappeared and use someRegion.onChage(50,Appeared(change)) this can work but can not print('change') but the screen is sure change i think is the // here goes your handler code need something? but i see the java api appeared the method is not print or return something -- 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 #680652]: how to use Region.onChange in pyton with jpype
Question #680652 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680652 Status: Answered => Open wu is still having a problem: so the onchange is work but i need to rewrite the ObserverCallBack the function ? -- 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 #678321]: Serious extended delay --- try with 1.1.4 from a Terminal
Question #678321 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678321 Desmond Zhen gave more information on the question: I get this error when i try to open sikulix through terminal. Error: Unable to access jarfile sikulix.jar -- 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 #678321]: Serious extended delay --- try with 1.1.4 from a Terminal
Question #678321 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678321 Desmond Zhen posted a new comment: permission denied when trying to start iDE through terminal. I’m using sikuli 1.3 btw just an update. If the script is just on my desktop what do I run in the terminal command to open the script on sikuli ?? Thanks for the help -- 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 #678321]: Serious extended delay --- try with 1.1.4 from a Terminal
Question #678321 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678321 Status: Answered => Open Desmond Zhen is still having a problem: Do I use a Sudo command on terminal -- 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 #680702]: Import Question
New question #680702 on Sikuli: https://answers.launchpad.net/sikuli/+question/680702 Starting here & here: https://sikulix-2014.readthedocs.io/en/latest/scripting.html?highlight=import%20* https://answers.launchpad.net/sikuli/+faq/2446 --testpad.sikuli-- from sikuli import * # the path containing your stuff - choose your own naming # on Windows myScriptPath = "D:\\MikE\\Sikuli Scripts" # all systems (avoids double entries in sys.path) addImportPath(myScriptPath) # supposing there is a testpad2.sikuli import testpad2 reload(testpad2) from testpad2 import * setShowActions (True) # testpad # Start script with functions # supposing myLib.sikuli contains a function "def myFunction():" testpad2.launchNox() testpad2.openUE() # # # end of script exit(1) --testpad2.sikuli-- # Testing Global Functions # Launch Nox def launchNox(): app = App("D:\\Program Files\\Nox\\bin\\Nox.exe") app.open(5) # does the focus as well reg = app.window(0) if exists("1555433103893.png"): hover("1555433103893.png") else: sleep(0) #function open UE app (default account) def openUE(): wait("1555426342139.png", 60) if exists("1555426342139.png"): click("1555426342139.png") else: sleep(0) wait("1556061400286.png", 30) hover("1556061400286.png") and I get this error: [error] script [ testpad ] stopped with error at line --unknown-- [error] Error caused by: Traceback (most recent call last): File "D:\MikE\Sikuli Scripts\testpad.sikuli\testpad.py", line 15, in testpad2.launchNox() File "D:\MikE\Sikuli Scripts\testpad2.sikuli\testpad2.py", line 2, in launchNox app = App("D:\\Program Files\\Nox\\bin\\Nox.exe") NameError: global name 'App' is not defined If I comment out line 15 I see this: [error] script [ testpad ] stopped with error at line --unknown-- [error] Error caused by: Traceback (most recent call last): File "D:\MikE\Sikuli Scripts\testpad.sikuli\testpad.py", line 16, in testpad2.openUE() File "D:\MikE\Sikuli Scripts\testpad2.sikuli\testpad2.py", line 13, in openUE wait("1555426342139.png", 60) NameError: global name 'wait' is not defined Still out of my depth, but making steady progress :D (trying to eliminate any repeat code / reuse as much as 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
Re: [Sikuli-driver] [Question #680652]: how to use Region.onChange in pyton with jpype
Question #680652 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680652 Status: Open => Answered RaiMan proposed the following answer: at the Java level use: someRegion.onChange(long, callback) where long is the minimum size for changed pixels (default 50) so my Java example again with 2 parameters:// one has to combine observed event and its handler // overriding the appropriate method someRegion.onChange(50, new ObserverCallBack() { @Override public void appeared(ObserveEvent event) { // here goes your handler code } } ); // run observation in foreground for 10 seconds someRegion.observe(10) -- 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 #680652]: how to use Region.onChange in pyton with jpype
Question #680652 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680652 RaiMan proposed the following answer: -- but why sikulix ide can use? It is internally implemented using Jython internals on the Python side and reflection on the Java side. 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 #680652]: how to use Region.onChange in pyton with jpype
Question #680652 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680652 Status: Solved => Open wu is still having a problem: look like i find onchange but it another error jpype._jexception.java.lang.ClassCastExceptionPyRaisable: java.lang.ClassCastException: java.lang.Long cannot be cast to org.sikuli.script.ObserverCallBack -- 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 #680652]: how to use Region.onChange in pyton with jpype
Question #680652 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680652 Status: Open => Solved wu 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 #680652]: how to use Region.onChange in pyton with jpype
Question #680652 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680652 Status: Answered => Open wu is still having a problem: i know thx RaiMan so if i want to use onchange in java api should to override the onchange? but why sikulix ide can use and don't override is not same? i just a beginner so... because i know ide is source in java and use python language i use in python to Region.Methods find onchange it show the onchange it not find 。that ok i will find another slove thx -- 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 #680652]: how to use Region.onChange in pyton with jpype
Question #680652 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680652 Status: Open => Answered RaiMan proposed the following answer: uuups, ok ;-) ... but if you want to work with jpype against a Java API, you need some basic knowledge about how Java classes/objects/methods have to be used. I have no time to check: it might be possible, that the above Java- typical callback construct cannot be implemented with jpype directly and might need a Python workaround. -- 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 #680659]: I am not able to find the Text on screen
Question #680659 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680659 Abilashkar posted a new comment: Thanks a lot RailMan solution worked :) :) -- 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 #680659]: I am not able to find the Text on screen
Question #680659 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680659 Status: Answered => Solved Abilashkar 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
[Sikuli-driver] [Bug 1828169] [NEW] [1.1.4] Region.text(): adds new-line at the end of the recognized string
Public bug reported: My code: a = find("1557282546849.png").text() b = "64" print a print "--" print b if a == b: print 'pass' else: print 'diff' Result: 64 -- 64 diff How to do with no empty string? ** Affects: sikuli Importance: High Assignee: RaiMan (raimund-hocke) Status: In Progress ** Changed in: sikuli Status: New => In Progress ** Changed in: sikuli Importance: Undecided => High ** Changed in: sikuli Assignee: (unassigned) => RaiMan (raimund-hocke) ** Changed in: sikuli Milestone: None => 1.1.4 -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1828169 Title: [1.1.4] Region.text(): adds new-line at the end of the recognized string Status in Sikuli: In Progress Bug description: My code: a = find("1557282546849.png").text() b = "64" print a print "--" print b if a == b: print 'pass' else: print 'diff' Result: 64 -- 64 diff How to do with no empty string? To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1828169/+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 #679151]: using type("foo bar") does not type the text into remote desktop window
Question #679151 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/679151 Status: Open => Answered RaiMan proposed the following answer: Ok, I will check, but may take a while. Other priorities currently. I will report here. -- 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 #680688]: [1.1.4] Region.text(): adds new-line at the end of the recognized string
Question #680688 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680688 Status: Answered => Solved Linda 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
[Sikuli-driver] [Question #680688]: Status of bug #1828169 changed to 'In Progress' in Sikuli
Bug #1828169 status changed in Sikuli: New => In Progress https://bugs.launchpad.net/sikuli/+bug/1828169 "[1.1.4] Region.text(): adds new-line at the end of the recognized string" This bug is linked to #680688. [1.1.4] Region.text(): adds new-line at the end of the recognized string https://answers.launchpad.net/sikuli/+question/680688 -- 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 #680688]: [1.1.4] Region.text(): adds new-line at the end of the recognized string
Question #680688 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680688 Summary changed to: [1.1.4] Region.text(): adds new-line at the end of the recognized string Description changed to: My code: a = find("1557282546849.png").text() b = "64" print a print "--" print b if a == b: print 'pass' else: print 'diff' Result: 64 -- 64 diff How to do with no empty string? -- 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 #680688]: [1.1.4] Region.text(): adds new-line at the end of the recognized string
Question #680688 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680688 Linked to bug: #1828169 https://bugs.launchpad.net/bugs/1828169 "[1.1.4] Region.text(): adds new-line at the end of the recognized string" -- 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 #680688]: [1.1.4]There is empty string connecting correct string with OCR
Question #680688 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/680688 Status: Open => Answered RaiMan proposed the following answer: ok, seems to be some weird behavior: it is not an empty string, but a new-line, that is added to the "64" I have to check. workarounds: use a = find("1557282546849.png").text().strip() ... which removes whitespace from start and end of string or a = find("64.png").collectWordsText()[0] ... see: https://sikulix-2014.readthedocs.io/en/latest/region.html#extracting-text-from-a-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