Re: [Sikuli-driver] [Question #665855]: SikulixIDE 1.1.2 - Would it be possible to optimize a long if/elsif/else loop with exists() inside?

2018-03-17 Thread masuo
Question #665855 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665855

Status: Open => Answered

masuo proposed the following answer:
Did you try findAnyList() ?
http://sikulix-2014.readthedocs.io/en/latest/region.html#find-more-than-one-image-in-a-region-at-the-same-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 #665855]: SikulixIDE 1.1.2 - Would it be possible to optimize a long if/elsif/else loop with exists() inside?

2018-03-17 Thread PowerPenguin
Question #665855 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665855

Description changed to:
Hello, I have a long piece of code and I was wondering if it would be
possible to optimise it so it goes faster. I have to check certain
region of the screen constantly to see what appears in it. The problem
is that it can appear up to 200 different things, so it needs to compare
200 different images with whatever is in the screen until it founds the
right one, and it has do to something different in the screen with each
one of the possible options. Right now, it does that just fine, but if
the image that appears is the last one of the loop it needs around 25
seconds to match it, and I would like to know if it would be possible to
reduce that time.

This is my code:

r = regionOfTheScreen
while True:
if r.inside().exists((Pattern(img1).exact()),0):
#do something
elif r.inside().exists((Pattern(img2).exact()),0):
#do something else

+198 elifs more with the same form.

Could I change something to make it faster? I already run it with only
the necessary programs running on my computer and I check the smallest
possible region of the screen.

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


[Sikuli-driver] [Question #665844]: http://www.southernminn.com/calendar/event_8cea1f3a-2a2a-11e8-83b4-5cb9017befcf.html

2018-03-17 Thread sdfd
New question #665844 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665844

http://www.southernminn.com/calendar/event_8cea1f3a-2a2a-11e8-83b4-5cb9017befcf.html

-- 
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 #665855]: SikulixIDE 1.1.2 - Would it be possible to optimize a long if/elsif/else loop with exists() inside?

2018-03-17 Thread PowerPenguin
New question #665855 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665855

Hello, I have a long piece of code and I was wondering if it would be possible 
to optimise it so it goes faster. I have to check certain region of the screen 
constantly to see what appears in it. The problem is that it can appear up to 
200 different things, so it needs to compare 200 different images with whatever 
is in the screen until it founds the right one, and it has do to something 
different in the screen with each one of the possible options. Right now, it 
does that just fine, but if the image that appears is the last one of the loop 
it needs around 25 seconds to match it, and I would like to know if it would be 
possible to reduce that time.

This is my code:

r = regionOfTheScreen
if r.inside().exists((Pattern(img1).exact()),0):
#do something
elif r.inside().exists((Pattern(img2).exact()),0):
#do something else

+198 elifs more with the same form.

Could I change something to make it faster? I already run it with only the 
necessary programs running on my computer and I check the smallest possible 
region of the screen. 

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


[Sikuli-driver] [Question #665775]: http://www.starherald.com/calendar/streaming-free-wales-vs-france-live-stream-free-six-nations/event_960177a2-29ef-11e8-bb7b-308d99b2b45f.html

2018-03-17 Thread vuziyadd
New question #665775 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665775

http://www.starherald.com/calendar/streaming-free-wales-vs-france-live-stream-free-six-nations/event_960177a2-29ef-11e8-bb7b-308d99b2b45f.html

-- 
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 #665790]: https://vk.com/page-163709070_52524083?=al_login.php?&_query=

2018-03-17 Thread sdfd
New question #665790 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665790

https://vk.com/page-163709070_52524083?=al_login.php?&_query=

-- 
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 #665826]: https://www.streamtv2pc.com/nhl/canadiens-vs-maple-leafs/

2018-03-17 Thread sdfd
New question #665826 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665826

https://www.streamtv2pc.com/nhl/canadiens-vs-maple-leafs/

-- 
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 #665839]: https://www.streamtv2pc.com/ufc/ufc-fight-night-127/

2018-03-17 Thread sdfd
New question #665839 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665839

https://www.streamtv2pc.com/ufc/ufc-fight-night-127/

-- 
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 #665835]: http://www.southernminn.com/calendar/event_f35caaa4-2a1f-11e8-a3d1-5cb9017b8da0.html

2018-03-17 Thread sdfd
New question #665835 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665835

http://www.southernminn.com/calendar/event_f35caaa4-2a1f-11e8-a3d1-5cb9017b8da0.html

-- 
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 #665783]: http://www.starherald.com/calendar/streaming-free-wales-vs-france-live-stream-free-six-nations/event_8cdefb56-29f2-11e8-bde3-8346ccfa0430.html

2018-03-17 Thread sdfd
New question #665783 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665783

http://www.starherald.com/calendar/streaming-free-wales-vs-france-live-stream-free-six-nations/event_8cdefb56-29f2-11e8-bde3-8346ccfa0430.html

-- 
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 #665809]: http://www.southernminn.com/calendar/event_732470e6-2a0c-11e8-9444-5cb9017befe8.html

2018-03-17 Thread sdfd
New question #665809 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665809

http://www.southernminn.com/calendar/event_732470e6-2a0c-11e8-9444-5cb9017befe8.html

-- 
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 #665797]: Image reconition not working after Settings.OcrTextRead = true;

2018-03-17 Thread Mohammed Saquib
New question #665797 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665797

Installed using 2 & 3 option checked


Settings.OcrTextRead = true;
Settings.OcrTextSearch = true;

for(int i = 0; i < 4; i++) {
Thread.sleep(3000);
Rectangle rectangle = new Rectangle(500, 
550+(i*25), 75, 20);
screen.setRect(rectangle);
String xx= screen.text();
xx= xx.substring(1);
System.out.println("$"+xx);
}

Settings.OcrTextRead = false;
Settings.OcrTextSearch = false;
Pattern scrollDown = new Pattern(iconPath + 
"scrolldown.png");
screen.mouseMove(scrollDown);
screen.click();

FindFailed: D:/Users//xx/images/scrolldown.png: (74x21) in S(0)[0,0 
1366x768] E:Y, T:3.0
  Line 2759, in file Region.java

at org.sikuli.script.Region.wait(Region.java:2759)
at org.sikuli.script.Region.find(Region.java:2336)
at org.sikuli.script.Region.getLocationFromTarget(Region.java:3213)
at org.sikuli.script.Region.mouseMove(Region.java:3986)
at xxx.SikuliMain.testM(SikuliMain.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:661)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)
at 
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.privateRun(TestRunner.java:744)
at org.testng.TestRunner.run(TestRunner.java:602)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
at org.testng.TestNG.runSuites(TestNG.java:1144)
at org.testng.TestNG.run(TestNG.java:1115)
at 
org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)

-- 
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 #665812]: http://www.southernminn.com/calendar/event_732470e6-2a0c-11e8-9444-5cb9017befe8.html

2018-03-17 Thread sdfd
New question #665812 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665812

http://www.southernminn.com/calendar/event_732470e6-2a0c-11e8-9444-5cb9017befe8.html

-- 
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 #665814]: http://www.southernminn.com/calendar/event_30367dca-2a10-11e8-8f10-5cb9017b3637.html

2018-03-17 Thread sdfd
New question #665814 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665814

http://www.southernminn.com/calendar/event_30367dca-2a10-11e8-8f10-5cb9017b3637.html

-- 
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 #665828]: http://www.southernminn.com/calendar/event_0661980a-2a23-11e8-a460-5cb9017beffc.html

2018-03-17 Thread sdfd
New question #665828 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665828

http://www.southernminn.com/calendar/event_0661980a-2a23-11e8-a460-5cb9017beffc.html

-- 
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 #665827]: https://www.streamtv2pc.com/ufc/ufc-fight-night-127/

2018-03-17 Thread sdfd
New question #665827 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665827

https://www.streamtv2pc.com/ufc/ufc-fight-night-127/

-- 
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 #665801]: http://www.philadelphiaweekly.com/calendar/wales-vs-france-live-stream-free-six-nations-rugby-game/event_5c27dfe2-2a05-11e8-a2d5-5cb9017b9fe4.html

2018-03-17 Thread sdfd
New question #665801 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665801

http://www.philadelphiaweekly.com/calendar/wales-vs-france-live-stream-free-six-nations-rugby-game/event_5c27dfe2-2a05-11e8-a2d5-5cb9017b9fe4.html

-- 
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 #665824]: http://www.southernminn.com/calendar/event_c4e1463e-2a1b-11e8-9c38-5cb9017bff17.html

2018-03-17 Thread sdfd
New question #665824 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665824

http://www.southernminn.com/calendar/event_c4e1463e-2a1b-11e8-9c38-5cb9017bff17.html

-- 
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 #665823]: http://www.southernminn.com/calendar/event_c4e1463e-2a1b-11e8-9c38-5cb9017bff17.html

2018-03-17 Thread sdfd
New question #665823 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665823

http://www.southernminn.com/calendar/event_c4e1463e-2a1b-11e8-9c38-5cb9017bff17.html

-- 
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 #665764]: https://www.shopyourway.com/questions/3246822

2018-03-17 Thread vuziyadd
New question #665764 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665764

https://www.shopyourway.com/questions/3246822

-- 
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 #665765]: https://www.shopyourway.com/questions/3247226

2018-03-17 Thread vuziyadd
New question #665765 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665765

https://www.shopyourway.com/questions/3247226

-- 
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 #665772]: http://www.starherald.com/calendar/live-tv-england-vs-ireland-live-stream-free-six-nations/event_1e55836c-29ed-11e8-a630-308d99b2b45f.html

2018-03-17 Thread vuziyadd
New question #665772 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665772

http://www.starherald.com/calendar/live-tv-england-vs-ireland-live-stream-free-six-nations/event_1e55836c-29ed-11e8-a630-308d99b2b45f.html

-- 
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