Re: [Sikuli-driver] [Question #262328]: After 2nd definition execution, system starts getting slow.
Question #262328 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/262328 RaiMan posted a new comment: could you please comment with more details what you mean with: I chose instead of having the drop down menu of 1.1.0 -- 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 #262328]: After 2nd definition execution, system starts getting slow.
Question #262328 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/262328 RaiMan posted a new comment: ok, thanks for feedback. I will do further testing, to get an idea of differences between 1.0.1 and 1.1.0 in your special case, that might need to different behaviour of the kinds you mentioned. all the best. -- 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 #262328]: After 2nd definition execution, system starts getting slow.
Question #262328 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/262328 Status: Open => Solved Dmitriy Chumachenko confirmed that the question is solved: Alright well, here's a development: I chose instead of having the drop down menu of 1.1.0 (which was kind of a big deal, but I'd rather have a working system than bells and whistles), I switched to 1.0.1. The reason is because after going back to files I've recently written, found out that the same issues were happening as described and no matter what I did, no matter how compacted or expanded the code was, it simply was not holding up. Ever since switching to 1.0.1 I am happy to report that the aforementioned code and all others are working like a dream. I guess the new version is not up to snuff just yet. Thanks for your input and advice and I'll be looking forward to future releases of this awesome software. -- 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 #262328]: After 2nd definition execution, system starts getting slow.
Question #262328 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/262328 Status: Answered => Open Dmitriy Chumachenko is still having a problem: Hello again. I made some revisions based on what you have said and realized that I wasn't giving Sikuli the visual feedback it needs to proceed as coded. I made some adjustments that I thought would benefit and double check what is happening whether I'm referencing images or not (in the case of the Key.RIGHT and LEFT movement). In the middle of the code, Sikuli simply crashes without warnings or error codes. Is the coding too redundant? def a(): ##OPEN SOFTWARE, FIND CORRECT CHANNEL if not exists (t): #Starting point, or reference for movement click (t) for x in range (6): type (Key.RIGHT) if not exists (t2,3):#t2=image reference point, confirming that Key. RIGHT did what it was supposed to click (t) for x in range (6): type (Key.RIGHT) #Repeat if not found t2 (CAN YOU DO THIS?) if not exists (t2,3): #If not found a second time, quit, print print ("Could not resolve Movement") ##OPEN SYNTH type (Key.F4) if not exists(u,3): #If synth doesn't appear, click F4 again. type (Key. F4) if not exists(u,3): print ("Could not resolve Synth") exit () #Quit if doesn't find second time click(wait(u, 4)) #THIS IS WHERE SIKULI CRASHES WITH NO WARNING, NO PRINTS AND NO ERROR CODES - JUST CRASHES ##SAVE OPERATION if not exists(b,4):#If save window doesn't appear, try again to click on synth save button click (u,4) if not exists (b,4):#Quit, print on second try print ("Could not resolve Opening synth") keyDown(Key.CMD) #Folder Invoke keyDown(Key.SHIFT) type ("g") keyUp(Key.SHIFT) keyUp(Key.CMD) if not exists(a,4): keyDown(Key.CMD) #Folder Invoke again if doesn't work the first time keyDown(Key.SHIFT) type ("g") keyUp(Key.SHIFT) keyUp(Key.CMD) if not exists(a,4): print ("Could not resolve Folder Point") exit ()#Quit, print if doesn't resolve Folder Point second time ##FOLDER POINT type ("/Beast Phoenix 01/03-Melodics/01-Albino/Ear Candy") wait(.5) if not exists (a1,4): #Type folder location again if image containing written out folder location was not found type ("/Beast Phoenix 01/03-Melodics/01-Albino/Ear Candy") wait(.5) if not exists(a1,4): print ("Could not resolve Folder Name") exit() #Quit, print if not found second time ##NOMENCLATURE type (Key.ENTER) #Folder type out wait(.5) type ("-01-Ear Candy Intro") wait(.5) if not exists(b2,4): #Re-type if came out wrong doubleClick (b2) type (Key.DELETE) type ("-01-Ear Candy Intro") if not exists(b2,4): #Print, quit if doesn't find second time print ("Could not resolve Nomenclature") exit() type (Key.ENTER) #File Name Save wait(.5) #FILE REPLACEMENT PROTOCOL if exists(h,4): click(wait(h, 4))#If prompted to replace file, do it type (Key.F4) #Close if not exists(t2,4): #If synth hadn't closed, do so now type (Key.F4) if not exists(t2,4): print ("Could not resolve Closing Synth") exit() -- 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 #262328]: After 2nd definition execution, system starts getting slow.
Question #262328 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/262328 Dmitriy Chumachenko posted a new comment: Thank you so much for a prompt response! I'm in the middle of implementing and absorbing what you said and will definitely write back with my findings! -- 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 #262328]: After 2nd definition execution, system starts getting slow.
Question #262328 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/262328 Status: Open => Answered RaiMan proposed the following answer: Still with Sikuli, typing and clicking cannot be checked, wether it is really done. The only chance is to check the screen, wether it has changed as expected after a series of Robot actions (type and click). So in your case it is not obvious, what really happens, besides the 2 places where you look for images (which should crash the script with FindFailed if the images are not there at that time): click(u) find(x) # this is redundant, click(x) is enough click(x) If you think an image to be clicked might not come up within the standard 3 seconds: click(wait(image, n)) # where n is the number of seconds to wait max So looking at your flow: we have these blocks: # block 1 type (Key.RIGHT) wait(.5) type (Key.RIGHT) wait(.5) type (Key.RIGHT) wait(.5) type (Key.RIGHT) wait(.5) type (Key.RIGHT) wait(.5) type (Key.RIGHT) wait(.5) type (Key.F4) wait(.5) # block 2 click (u) # block 3 keyDown(Key.CMD) keyDown(Key.SHIFT) type ("g") keyUp(Key.SHIFT) keyUp(Key.CMD) type ("/Beast Phoenix 01/03-Melodics/01-Albino/Ear Candy") #Changes from a() to b() to c() this is my folder location wait(.5) type (Key.ENTER) wait(.5) type (“Changeable text") wait(.5) type (Key.ENTER) wait(.5) # block 4 find (x) #Defined image reference click (x) # block 5 wait(.5) type (Key.F4) wait(.5) blocks 1, 3 and 5 simply run through, without any feedback, wether they really did their job This sometimes looks like "runs, but does nothing" if the GUI is not in the state to accept the Robot actions (which should usually do some beeps at least for the type's going to nowhere) blocks 2 and 4 contain a screen search for images u and x and hence should fail, if the images are not there. I cannot see any place in the script, where it should hang for more than 3 seconds (the find/click), supposing you did not raise the standard waiting time somehow. Spikes in cpu usage by SikuliX are caused by the search functions (find/wait/click(image)), which is pure number crunching). To make such scripts robust and reliable, one has to insert some visual checks, to assure, that the GUI has reacted as expected after some Robot actions. example: # block 1 … # supposing the trailing F4 leads to some changes in the GUI: if not exists(some_check_image, maxTime): print("F$ did not work") exit() # at this place one might implement corrective actions, but usually it does not make sense to continue So with SikuliX version 1.1.0+ there is no need to reinstall Java or SikuliX for these kind of symptoms, besides, that one should always use the latest Java version (for now 7 is ok, 8 need not be) and watch out for change information about SikuliX versions or known bugs. -- 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 #262328]: After 2nd definition execution, system starts getting slow.
New question #262328 on Sikuli: https://answers.launchpad.net/sikuli/+question/262328 Hello. I’ve been messing around with Sikuli for about a year now and still consider myself a super noob. I want to add as much detail as possible as I have trolled previous questions and understand the need for clarity in these things. So to the point: I’ve been writing some automation to help me with a workflow making music. The code was designed to help me save individual patches on synthesizers that I use within a program called Vienna Ensemble Pro which is a DAW (Digital Audio Workstation). It’s a fancy way of saying its a music-making software. In any case, the below code repeats three times with minor details such as the movements left and right using the keyboard arrows and text entry. I have defined these events as a() b() and c(). When I execute any two combinations, I get the results I want, however run into a variety of slow-down behavior when I execute all three in the vein of: a() b() c() Some of the problems read as "[error] java.lang.ThreadDeath" or "java.lang.InterruptedException: sleep interrupted" and a whole bunch of black text that follows. If its important, I can follow up with the complete list. The slowdowns don’t always happen at the same point and problems are not always the same despite no change in code. Most recently it has gotten to a point where Sikuli tells me all actions were executed from start to finish, but visually I can see that according to my affected software, its not true. Problems include: spikes (rare and very temporary) in activity monitor’s CPU count (using Mac, btw) for Sikuli, NOT software affected (which, I guess rules out Vienna as the culprit), intermittent text entry (missing letters, not completing the typed out string and seemingly completely stopping), Sikuli catching up a few seconds after it has slowed to a halt or simply not executing said commands and reporting completion. It would be also of note to mention that the slowdown behavior doesn’t happen until the end of execution of c() I have tried three times now to start from scratch and even though used definitions to define others and use x in range to define how many times something is typed (to shorten the code count), I have compiled the simplest and the most working code which is below. I have tried adding wait times of several different amounts just to see if it was a performance issue with my computer or other software but with the same results. Granted, starting from scratch I mean just a new file with old code copy and pasted, but figured that wouldn’t make much of a difference. The crazy thing is I had it working at one point where all three executed but after a restart and never repeating again, I’ve chalked it up to a fluke. I’ve started wondering if there is too much code to reference or execute, but the fact that I know its possible (because I did it) tells me otherwise. The only thing I haven’t done is reinstall java and Sikuli (which is most likely next). I understand that the 1.1.0 software is still under development (which is what I’m using) but I’ve written more complicated stuff than this without so much as a hiccup. Other interesting thing to note is that when the combo of two are executed, the GUI appears to be evenly timed in between events, however when all three are executed, it seems to start out really fast (faster than normal) and than starts becoming more unpredictable in its time between executions as it nears completion until its stopped dead or latent by at least 30 seconds. That always happens by about the fourth or fifth command from the end, but has been wild in its predictability (hence why I’m writing). In any case Help! And thanks in advance! switchApp (vienna ensemble pro) def a(): type (Key.RIGHT) wait(.5) type (Key.RIGHT) wait(.5) type (Key.RIGHT) wait(.5) type (Key.RIGHT) wait(.5) type (Key.RIGHT) wait(.5) type (Key.RIGHT) wait(.5) type (Key.F4) wait(.5) click (u) keyDown(Key.CMD) keyDown(Key.SHIFT) type ("g") keyUp(Key.SHIFT) keyUp(Key.CMD) type ("/Beast Phoenix 01/03-Melodics/01-Albino/Ear Candy") #Changes from a() to b() to c() this is my folder location wait(.5) type (Key.ENTER) wait(.5) type (“Changeable text") wait(.5) type (Key.ENTER) wait(.5) find (x) #Defined image reference click (x) wait(.5) type (Key.F4) wait(.5) -- 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