sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #38843
[Bug 1433454] Re: [1.1.0] Mac OS X 10.10: Scripts slowing down click/type after some rather short runtime
*** This bug is a duplicate of bug 1447096 ***
https://bugs.launchpad.net/bugs/1447096
Crazy temporarily solution found?
I have Mac 10.10.5 and Java 7 and SikuliX IDE 1.1.0 and have the same
problem. I simplified the program to see what happens if Text Editor
screen is active:
list=Env.getClipboard().split(",") #the string '1,2,3,4,5,6 ... ,999' is in clipboard
for x in list:
wait(0.1) #i hate my slow mac
paste(str(x))
wait(0.1)
type("\n")
over and over again the script begins 'hanging' between 100th and 150th
loop (but not when leaving Env.getClipboard().split(",") out of the
script.) Each time I change the mouse location so that it's hovering the
Dock — or if already at that location: change it so that it's NOT
hovering the Dock — the script runs again a few seconds. This also
happens when hiding or activating the Dock by the Mac shortcut
ALT+CMD+"d". Even commanding Sikuli to constantly show/hide the Dock by
adding type("d", KeyModifier.ALT + KeyModifier.CMD) in the for-loop
works. My temporarily solution with Env.getClipboard().split() used
looks something like this:
n=0
list=Env.getClipboard().split(",") #the string '1,2,3,4,5,6 ... ,999' is in clipboard
for x in list:
n+=1
wait(0.1) #i hate my slow mac
paste(str(x))
wait(0.1)
type("\n")
if n%5 == 0: #i dont want to show/hide the dock 10 times per second, '5' is slow enough in this case, because my script is running several seconds after pressing ALT+CMD+"d" which is clearly >5 loops.
type("d",KeyModifier.ALT + KeyModifier.CMD)
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1433454
Title:
[1.1.0] Mac OS X 10.10: Scripts slowing down click/type after some
rather short runtime
Status in Sikuli:
In Progress
Bug description:
******** did some testing with
Mac OS X 10.10.2
Java 1.8.0_20 (64-Bit)
SikuliX version 1.1.0 (build 201503181055)
The script (run from the IDE) has a loop, where a new Mail is opened,
some clicks and types are done and the mail is closed with do-not-
save.
The 50 loop-turns ran with constant speed to the end.
(elapsed time about 15 minutes)
I could not see any slowdown effects here.
with this script
-------
switchApp("Mail")
newMail = "newMail.png"
anhang = "anhang.png"
nosave = "nosave.png"
for i in range(50):
start = time.time()
click(newMail)
win = App.focusedWindow()
win.highlight(1)
win.click(anhang)
wait(2)
type(Key.ESC)
ref = win.getLastMatch()
an = ref.offset(50,35)
betreff = an.offset(0, 70)
memo = an.offset(0, 150)
click(an)
type("a", Key.CMD); type(Key.BACKSPACE)
type("rhock"); wait(1); type(Key.ENTER)
click(betreff)
type("a", Key.CMD); type(Key.BACKSPACE)
type("this is some test"); wait(1)
click(memo)
type("a", Key.CMD); type(Key.BACKSPACE)
type("this is some test\n");
type("this is some test\n");
type("this is some test\n");
type("this is some test\n");
wait(2)
type("w", Key.CMD)
win.click(nosave)
wait(2)
print int(time.time()-start)
-------
Using os x 10.10.2, and sikuli 1.1.0 build. I'm pretty new to sikuli,
but have created about a 70 line script. basic stuff, click on this
button, type a short command, etc. however about 40-50 instructions
in (not always at the same spot), performance *suddenly* slows to a
crawl where each instruction can take almost 15 seconds to execute. i
searched around and couldn't come up w/ anything. thoughts?
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1433454/+subscriptions
References