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 : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp