Re: [Sikuli-driver] [Question #272083]: .
Question #272083 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272083 Status: Open => Solved Sharon confirmed that the question is solved: . -- 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 #272083]: .
Question #272083 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272083 Summary changed to: . Description changed to: . -- 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 #272083]: How to call methods from one Sikuli script in another
New question #272083 on Sikuli: https://answers.launchpad.net/sikuli/+question/272083 Hi everyone, I have a pretty simple question for you. I'm running a Sikuli script in SikuliX IDE and want to call some methods from a different Sikuli script. I know how to do that with a simple python script. How do I do that same with Sikuli? 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 #272065]: Sikuli C# Integration Issue - Win32Util.dll: %1 is not a valid Win32 application
Question #272065 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272065 manoj gave more information on the question: the below responses are already tried, but not working. First one Install-Package SikuliIntegrator class > SikuliAction method > DragDrop & DoubleClick /*solution for one of the problem fixed*/ https://a.fsdn.com/con/app/proj/sikuli4net/screenshots/2014-08-21%2019_31_27-Sikuli4NetTests%20-%20SharpDevelop.png Second One PM> Install-Package Sikuli4Net var from = new Pattern("C:\\Document_Image_Repository\\case_study.png"); var to = new Pattern("C:\\Document_Image_Repository\\nortal_networks.png"); var pcreen = new Screen(); pcreen.Find(from); pcreen.Click(from); issues faced here http://sourceforge.net/p/sikuli4net/discussion/general/thread/2361c15b/ http://sqa.stackexchange.com/questions/9485/sikuli-wrapper-for-net-unable-to-connect-to-the-remote-server Both are run into issues -- 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 #272057]: [1.1.0] Multiple Observers threading --- use observeInBackground()
Question #272057 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272057 Summary changed to: [1.1.0] Multiple Observers threading --- use observeInBackground() -- 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 #272057]: Multiple Observers threading
Question #272057 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272057 Status: Open => Answered RaiMan proposed the following answer: Be sure to have the latest nightly 1.1.0 and looked into the docs about observe (revised yesterday). -- 1. with your threading ... ... since you delegated everything to threads, the main script immediately stops after the last statement, since nothing else to do. add a sufficient wait(someTime), and it should work. -- 2. using the whole screen ... ... is problematic, since it is one "static" Region object and as the error tells you: [error] Region: observe: already running for this region. Only one allowed! so this would solve it: reg1 = SCREEN reg2 = Region(SCREEN) or reg2 = Screen(0) which both create a new Region object for the whole screen -- 3. we have our own threaded observe: observeInBackground() runs in parallel reg1 = Region(76,61,569,635) reg2 = Region(680,66,637,622) addImagePath(r'C:\Sikuli Nightly') def findMario(): reg1.onAppear('Mario_png.PNG', lambda e:popup("Mario Appeared")) reg1.observeInBackground(FOREVER) def findMushroom(): reg2.onAppear('Mushroom2.PNG', lambda e:popup("Mushroomh Appeared")) reg2.observeInBackground(FOREVER) findMario() findMushroom() wait(60) # hoping something happens within 60 seconds 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 #272057]: [1.1.0] Multiple Observers threading --- use observeInBackground()
Question #272057 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272057 RaiMan proposed the following answer: by the way: someRegion.observeInBackground() would be sufficient, since FOREVER is the default -- 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 #271996]: Status of bug #1502783 changed to 'Fix Committed' in Sikuli
Bug #1502783 status changed in Sikuli: New => Fix Committed https://bugs.launchpad.net/sikuli/+bug/1502783 "[1.1.0] Observe: log messages should be revised to be more clear" This bug is linked to #271996. Can't get observer() to work… https://answers.launchpad.net/sikuli/+question/271996 -- 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 #271996]: Can't get observer() to work…
Question #271996 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/271996 RaiMan posted a new comment: Thank YOU for this valuable feedback. I will revise the logging of course, to make it more clear. -- 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 #271996]: Can't get observer() to work…
Question #271996 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/271996 Linked to bug: #1502783 https://bugs.launchpad.net/bugs/1502783 "[1.1.0] Observe: log messages should be revised to be more clear" -- 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 1502783] [NEW] [1.1.0] Observe: log messages should be revised to be more clear
Public bug reported: *** the comment from the related question: The logging is a bit odd, though. Region.isObserving() often reports false, though there still seem to be observers. Region.stopObserver() also /says/ it stops the observer… then some other logs say the observer isn't stopped, and when I put an observer on another region, it reports "n + 1" observers… i.e., I get a monotonically increasing number of observers. -- This is the 2015-09-25 daily. I have Python code like: leftRegion = changeEvent = leftRegion.onChange() if not leftRegion.observe(True): print "Could not start observer" exit() The program always exits (i.e., the observation can't start), with debug/error messages like: [debug] Region: R[544,943 790x83]@S(0): observer CHANGE : 1443785667124 with: 50 [debug] Region: observe: starting in R[544,943 790x83]@S(0) for 1.0 seconds [debug] Observer: resetting observe states for R[544,943 790x83]@S(0) [debug] Observing: add observer: now running 1 observer(s) [debug] Observer: update result: Patterns: false [debug] Observer: update result: Changes: true [debug] Observer: update result: Patterns: false [debug] Observer: update result: Changes: true [debug] Observer: update result: Patterns: false [debug] Observer: update result: Changes: true [debug] Observer: update result: Patterns: false [debug] Observer: update result: Changes: true [debug] Region: observe: stopped due to timeout in R[544,943 790x83]@S(0) for 1.0 seconds Could not start observer [debug] Sikulix: cleanUp: 0 [info] Exit code: 0 [debug] Exit code: 0 [debug] Sikulix: cleanUp: 0 So the observer can't start… or it does start, but only runs for 1 second? (and what's the "Changes: true" bit? There's nothing changing on the screen at this point.) If I try: leftRegion.observe(FOREVER, True), it tells me the observe functions expects 0-1 arguments, not 2. If I try leftRegion.observe(background=True) (with or without a time arg), it tells me observe doesn't take any keyword arguments: [error] script [ DOFFOptions ] stopped with error in line 235 [error] TypeError ( observe(): takes no keyword arguments ) [error] --- Traceback --- error source first line: module ( function ) statement 60: AssignmentTasks ( collectComplete ) if not leftRegion.observe(FOREVER, background=True): [error] --- Traceback --- end -- [debug] Sikulix: cleanUp: 0 Any ideas? (Oh, and it slows down my mouse too. ;-) ) ** Affects: sikuli Importance: High Assignee: RaiMan (raimund-hocke) Status: Fix Committed ** Changed in: sikuli Status: New => Fix Committed ** Changed in: sikuli Importance: Undecided => High ** Changed in: sikuli Assignee: (unassigned) => RaiMan (raimund-hocke) ** Changed in: sikuli Milestone: None => 1.1.0 ** Description changed: + *** the comment from the related question: + + The logging is a bit odd, though. Region.isObserving() often reports + false, though there still seem to be observers. Region.stopObserver() + also /says/ it stops the observer… then some other logs say the observer + isn't stopped, and when I put an observer on another region, it reports + "n + 1" observers… i.e., I get a monotonically increasing number of + observers. + + -- + This is the 2015-09-25 daily. I have Python code like: - leftRegion = + leftRegion = - changeEvent = leftRegion.onChange() - if not leftRegion.observe(True): - print "Could not start observer" - exit() + changeEvent = leftRegion.onChange() + if not leftRegion.observe(True): + print "Could not start observer" + exit() The program always exits (i.e., the observation can't start), with debug/error messages like: - [debug] Region: R[544,943 790x83]@S(0): observer CHANGE : 1443785667124 with: 50 [debug] Region: observe: starting in R[544,943 790x83]@S(0) for 1.0 seconds [debug] Observer: resetting observe states for R[544,943 790x83]@S(0) [debug] Observing: add observer: now running 1 observer(s) [debug] Observer: update result: Patterns: false [debug] Observer: update result: Changes: true [debug] Observer: update result: Patterns: false [debug] Observer: update result: Changes: true [debug] Observer: update result: Patterns: false [debug] Observer: update result: Changes: true [debug] Observer: update result: Patterns: false [debug] Observer: update result: Changes: true [debug] Region: observe: stopped due to timeout in R[544,943 790x83]@S(0) for 1.0 seconds Could not start observer [debug] Sikulix: cleanUp: 0 [info] Exit code: 0 [debug] Exit code: 0 [debug] Sikulix: cleanUp: 0 - -
[Sikuli-driver] [Question #272065]: Sikuli C# Integration Issue - Win32Util.dll: %1 is not a valid Win32 application
New question #272065 on Sikuli: https://answers.launchpad.net/sikuli/+question/272065 We are integrating the Sikuli in our C# selenium ui automation script. We are facing issues while executing some of the methods in SikulActions class. Please find the below. Using Sikuli 1. We could identify an image in UI - working 2. We could click on an image - working 3. Double click on an image throws the attached error “Win32Util.dll: %1 is not a valid Win32 application” System.Exception was unhandled by user code HResult=-2146233088 Message=Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\THANGAMX\Documents\Visual Studio 2013\Projects\ImagingServices\ImagingServices\bin\Debug\libs\Win32Util.dll: %1 is not a valid Win32 application at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary1(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.load0(Unknown Source) at java.lang.System.load(Unknown Source) at com.wapmx.nativeutils.jniloader.NativeLoader.loadLibrary(NativeLoader.java:44) at org.sikuli.script.Win32Util.(Win32Util.java:19) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.sikuli.script.Env.getOSUtil(Env.java:91) at org.sikuli.script.ScreenHighlighter.init(ScreenHighlighter.java:180) at org.sikuli.script.ScreenHighlighter.(ScreenHighlighter.java:293) at org.sikuli.script.Screen.initBounds(Screen.java:105) at org.sikuli.script.Screen.(Screen.java:117) at com.sikuliintegrator.Operation.DoubleClick(Operation.java:93) at com.sikuliintegrator.Pointer.main(Pointer.java:102) Source=SikuliModule StackTrace: at SikuliModule.Commander.ConsumeResult(String output, String error) in c:\Users\Angel\Dropbox\Projects\SikuliModule\SikuliModule\Commander.cs:line 94 at SikuliModule.Commander.Execute(Command command, String mainPattern, String extraPattern, Single similarity, Int32 timeout) in c:\Users\Angel\Dropbox\Projects\SikuliModule\SikuliModule\Commander.cs:line 73 at SikuliModule.SikuliAction.DoubleClick(String pattern) in c:\Users\Angel\Dropbox\Projects\SikuliModule\SikuliModule\SikuliAction.cs:line 58 at ImagingServices.MouseTools.MarkupManager.MarkupManagerTests.Verify_Revert_ConfirmationBox() in c:\Users\THANGAMX\Documents\Visual Studio 2013\Projects\ImagingServices\ImagingServices\MouseTools\MarkupManager\MarkupManagerTests.cs:line 66 InnerException: 4. DragDrop on an image throws the attached error “Win32Util.dll: %1 is not a valid Win32 application” System.Exception was unhandled by user code HResult=-2146233088 Message=Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\THANGAMX\Documents\Visual Studio 2013\Projects\ImagingServices\ImagingServices\bin\Debug\libs\Win32Util.dll: %1 is not a valid Win32 application at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary1(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.load0(Unknown Source) at java.lang.System.load(Unknown Source) at com.wapmx.nativeutils.jniloader.NativeLoader.loadLibrary(NativeLoader.java:44) at org.sikuli.script.Win32Util.(Win32Util.java:19) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.sikuli.script.Env.getOSUtil(Env.java:91) at org.sikuli.script.ScreenHighlighter.init(ScreenHighlighter.java:180) at org.sikuli.script.ScreenHighlighter.(ScreenHighlighter.java:293) at org.sikuli.script.Screen.initBounds(Screen.java:105) at org.sikuli.script.Screen.(Screen.java:117) at com.sikuliintegrator.Operation.DoubleClick(Operation.java:93) at com.sikuliintegrator.Pointer.main(Pointer.java:102) Source=SikuliModule StackTrace: at SikuliModule.Commander.ConsumeResult(String output, String error) in c:\Users\Angel\Dropbox\Projects\SikuliModule\SikuliModule\Commander.cs:line 94 at SikuliModule.Commander.Execute(Command command, String mainPattern, String extraPattern, Single similarity, Int32 timeout) in c:\Users\Angel\Dropbox\Projects\SikuliModule\SikuliModule\Commander.cs:line 73 at SikuliModule.SikuliAction.DragDrop(String pattern) in c:\Users\Angel\Dropbox\Projects\SikuliModule\SikuliModule\SikuliAction.cs:line 58 at ImagingServices.MouseTools.MarkupManager.MarkupManagerTests.Verify_Revert_ConfirmationBox() in c:\Users\THANGAMX\Documents\Visual Studio 2013\Projects\ImagingServices\ImagingServices\MouseTools\MarkupManager\MarkupManagerTests.cs:line 66 InnerException:
Re: [Sikuli-driver] [Question #272065]: Sikuli C# Integration Issue - Win32Util.dll: %1 is not a valid Win32 application
Question #272065 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272065 Status: Open => Answered RaiMan proposed the following answer: I am sorry, but currently I cannot really help you. I guess the mentioned wrappers are not up to date. You have to ask the responsible developers using their channels. At least with version 1.1.0 there is an experimental run server, that allows to run script snippets without delay. see: http://www.sikulix.com/support.html Better support for C# in SikuliX will only be available in version 2. -- 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 #272070]: What's the best way to run multiple scripts in sequence
New question #272070 on Sikuli: https://answers.launchpad.net/sikuli/+question/272070 I'm new to the whole scene and read about different approaches over the lest 3 days. Best one for me and for now looks like this: dir = "the_path_to_main_directory" scripts=["script1","script2","script3","script4",..] scriptPath = os.path.join(dir, "script1"+".sikuli") setBundlePath(scriptPath) execfile(os.path.join(scriptPath, "script1"+".py")) scriptPath = os.path.join(dir, "script2"+".sikuli") setBundlePath(scriptPath) execfile(os.path.join(scriptPath, "script2"+".py")) scriptPath = os.path.join(dir, "script3"+".sikuli") setBundlePath(scriptPath) execfile(os.path.join(scriptPath, "script3"+".py")) scriptPath = os.path.join(dir, "script4"+".sikuli") setBundlePath(scriptPath) execfile(os.path.join(scriptPath, "script4"+".py")) Since there will be a lot of tests where I would have to put 15+ scripts together, it would take to much time to get those tests up and running. So my question is, what would be the easiest way to run those scripts in a sequence? I also tried import, but couldn't get it to work the way that's described already in : https://answers.launchpad.net/sikuli/+question/267115. -- 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 #272070]: What's the best way to run multiple scripts in sequence
Question #272070 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272070 Status: Open => Answered RaiMan proposed the following answer: I Suppose we are talking about pre final version 1.1.0 (http://sikulix.com): if you want to stay with the concept "one-test-is-one-script", then you should have a look at: http://sikulix-2014.readthedocs.org/en/latest/scripting.html#running-scripts-and-snippets-from-within-other-scripts-and-run-scripts-one-after-the-other The other principal way is to use the unittest approach: faq 1804 (HTMLTestRunner is bundled with 1.1.0 already) -- 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 #272071]: I'm new in Jython and Sikuli
New question #272071 on Sikuli: https://answers.launchpad.net/sikuli/+question/272071 Hello. If some one help me with my problem - would be nice and +1 in karma. Code with sikuli for automation install application. - I have the following piece of code in eclipse: from sikuli.Sikuli import * import logging import time logging.basicConfig(format = u'%(filename)s[LINE:%(lineno)d]# %(levelname)-8s [%(asctime)s] %(message)s', level = logging.DEBUG) SCREEN = Screen(0) myApp = App("Select Setup Language") switchApp(myApp) i = ("D:\example\workspace\JythonSikuli\src\Images\Knopka_OK_NumberOK.png") focusWindow = myApp Region.click(myApp, i) and I get the following error when running: Traceback (most recent call last): File "D:\example\workspace\JythonSikuli\src\Lenguage_Select.py", line 10, in Region.click(myApp, i) TypeError: click(): self arg can't be coerced to org.sikuli.script.Region Please let me know if you're having any idea of what I'm doing wrong. Thanks a lot! -- 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 #272088]: onAppear with an array of images?
New question #272088 on Sikuli: https://answers.launchpad.net/sikuli/+question/272088 https://pastebin.com/9fFre1Bm How do I go about doing something like this? It sounded like a fairly simple concept when I started, but it seems like onAppear only works with individual 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 #271996]: Can't get observer() to work…
Question #271996 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/271996 Glowing Crystalline Entity posted a new comment: No worries. Thanks for looking at the logging. :) -- 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 #272071]: I'm new in Jython and Sikuli
Question #272071 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272071 Status: Answered => Solved Denis 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 #272070]: What's the best way to run multiple scripts in sequence
Question #272070 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272070 Aleksander posted a new comment: Sorry, I'm running the Sikuli 1.0.1. The "one-test-is-one-script" I wouldn't use cause of the complex test cases I have to do. It would be easier to define test cases with predefined scripts. Will check the faq 1804 and get familiar with it. -- 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 #272071]: I'm new in Jython and Sikuli
Question #272071 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272071 Status: Open => Answered RaiMan proposed the following answer: at least you should have a look at the docs, before using a try-and- error approach. In any case I recommend to use the pre final 1.1.0 (http://sikulix.com) switchApp(myApp) # should bring the window to front wait(2) # give system some time to rearrange the GUI focusWindow = App.focusedWindow() # the frontmost window area as Region img = ("D:\example\workspace\JythonSikuli\src\Images\Knopka_OK_NumberOK.png") focusWindow.click(img) ... to more efficiently act with images: setBundlePath(r"D:\example\workspace\JythonSikuli\src\Images") # somewhere at the beginning ... and later: focusWindow.click("Knopka_OK_NumberOK.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 #272075]: Using multiple hotkeys without popups? Is this possible?
Question #272075 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272075 Sam gave more information on the question: Actually, I stand corrected. I can only run the second script after I have pressed Okay to the first script. Is there anyway to be able to run both of them at any time? -- 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 #272075]: Using multiple hotkeys without popups? Is this possible?
Question #272075 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272075 Status: Open => Needs information RaiMan requested more information: how does your current script look like? What do you mean by hot-keys? -- 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 #272075]: Using multiple hotkeys without popups? Is this possible?
Question #272075 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272075 Sam gave more information on the question: scr2 = Screen(2) #scr2.click("1443724310615.png") data= [None]*33 # creating a list full of 0s def CopyPage(event): scr2.click("1444047041130.png") # data= [None]*34 # creating a list full of 0s # data[12]= "Unknown" # should reset clipboard like stated below - temp fix x = 0 for x in range(0, len(data),1): # App.setClipboard(data[x]) # sends data to keyboard # wasn't using e== before that's why swap wasn't working but != was type(Key.TAB) type("c", KeyModifier.CTRL) data[x] = Env.getClipboard() App.setClipboard("0") # should clear clipboard or set to known value here - this would avoid repeats in front of no copies like heating system ++x print data[x] print x scr2.click("1444055393604.png") type(Key.TAB) type(Key.TAB) type(Key.TAB) x=0 print data[0] for x in range(0, len(data),1): # App.setClipboard(data[x]) # sends data to keyboard # wasn't using e== before that's why swap wasn't working but != was if data[x] == "0" : type(Key.TAB) ++x else: paste(data[x]) type(Key.TAB) ++x print data[x] #Passive Hotkeys Env.addHotkey(Key.NUM1,KeyModifier.CTRL, CopyPage) popup("Press Ctrl+num1 instead of clicking a button") # need this popup to run in the background and the script can continue to run in the background def PasteCalendar(event): paste(data[17]) type(",") paste(data[11]) type(",") paste(data[23]) type(",") paste( data[24]) Env.addHotkey(Key.NUM2,KeyModifier.CTRL, PasteCalendar) popup("Press Ctrl+num2 instead of clicking a button") Thanks for the reply RaiMan. I can press all my hotkeys at once now. I thought there was something wrong with the popups and I'd rather not have them, but I suppose I do need some way to exit the script. Everything is working now, but I've posted my (very sloppy) code above. Thanks again for the reply -- 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 #272074]: How to Manage image recognition across windows versions ?
New question #272074 on Sikuli: https://answers.launchpad.net/sikuli/+question/272074 I have a set of sikuly script running well on a windows 2003, but failing on 2008. Same fro script adapted for 2008, they are failing on 2012... The reason is simple : Microsoft have change the appearance of the dialog & Button ( just run winver and look at the "OK" button" ) Setting similarity to a lower value does not really help. Does somebody have already face such issue ? I don't want to redo all screen shoot :-( -- 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 #272074]: How to Manage image recognition across windows versions ?
Question #272074 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272074 Status: Open => Answered RaiMan proposed the following answer: Currently the only solution is to have a different image set for each environment. This might be helpful: http://sikulix-2014.readthedocs.org/en/latest/scripting.html#image-search-path-where-sikulix-looks-for-image-files -- 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 #272075]: Using multiple hotkeys without popups? Is this possible?
New question #272075 on Sikuli: https://answers.launchpad.net/sikuli/+question/272075 I would like to call any of 3 hotkey functions in my script at any time. Currently I need to go in order. I need to use the first hotkey, press okay on the popup. Then I can use the second hotkey, press okay. Then I can use the third hotkey. I was hoping I could use any of the three hotkeys at any time without restarting the script. Do you have any suggestions for this? Thank you -- 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 #272075]: Using multiple hotkeys without popups? Is this possible?
Question #272075 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272075 Status: Needs information => Open Sam gave more information on the question: Eh, I guess I can run them all at the same time. I messed up the first few times I suppose, but now it seems to be working. I don't really mind having a few popups in the background I suppose. -- 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 #272075]: Using multiple hotkeys without popups? Is this possible?
Question #272075 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272075 Status: Open => Answered RaiMan proposed the following answer: ok, I think, I understand your problem. If you want to run a script, that only implements hotkeys and does nothing else, then this is a possible generic structure: shouldRun = True def handler1(event): # do something if the corresponding hotkey is pressed def handler2(event): # do something if the corresponding hotkey is pressed ... more of them if needed def handlerStop(): global shouldRun shouldRun = False Env.addHotkey(Key.NUM1,KeyModifier.CTRL, handler1) Env.addHotkey(Key.NUM2,KeyModifier.CTRL, handler2) ... more of them if needed Env.addHotkey("x",KeyModifier.CTRL + KeyModifier.ALT, handlerStop) # press ctrl-alt-x to stop the script # if you want: popup("hotkeys are active now - click OK") while shouldRun: # keep the script alive until the stop key is pressed wait(1) # if you want: popup("hotkeys will be deactivated after clicking ok") activated hotkeys are auto-inactivated when the script ends. -- 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