Re: [Sikuli-driver] [Question #293220]: Can't click when using a Match object - JAVA

2016-05-03 Thread Eugene S
Question #293220 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293220

Status: Open => Answered

Eugene S proposed the following answer:
I afraid this is not how it works.

What you are trying to do is to click the Iterator object while
what you really need to do is click on each one of the found elements
(if any). Try something like this:

ImagePath.setBundlePath("C:/temp/sikulipatterns/");
Screen s = new Screen();

Iterator results = s.findAll("eclipseDocIcon.png");

while (results.hasNext()) {
Match currentMatch = results.next();
currentMatch.highlight(1); //this helps to visualize the process and better 
understand what elements have been found
currentMatch.click(); 
}

-- 
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 #293220]: Can't click when using a Match object - JAVA

2016-05-03 Thread Joe Taylor
New question #293220 on Sikuli:
https://answers.launchpad.net/sikuli/+question/293220

I'm needing to click on multiple of the same image my only problem is when I'm 
trying to click a match the mouse is just clicking and not moving to the 
coordinates of the images found. The match iterator is able to find all the 
images but its just not moving to them. I've tried a couple of tests with 
different images but its not working... Any help is appreciated.

-- 
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 #293220]: Can't click when using a Match object - JAVA

2016-05-03 Thread Joe Taylor
Question #293220 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293220

Description changed to:
I'm needing to click on multiple of the same image my only problem is
when I'm trying to click a match the mouse is just clicking and not
moving to the coordinates of the images found. The match iterator is
able to find all the images but its just not moving to them. I've tried
a couple of tests with different images but its not working... Any help
is appreciated.

My code:


import java.util.Iterator;

import org.sikuli.script.FindFailed;
import org.sikuli.script.Match;
import org.sikuli.script.Screen;

public class TestClick {
static String greenTile = "C://Java//greenTile.png";
static String yellowTile = "C://Java//yellowTile.png";
static String purpleTile = "C://Java//purpleTile.png";
static String blueTile = "C://Java//blueTile.png";

public static void main(String[] args) throws InterruptedException {
Screen s = new Screen();
Iterator matches = null;
while (true) {
try {
matches = s.findAll(greenTile);
for (; matches.hasNext(); matches.next()) {
try {
s.click(matches);
Thread.sleep(1000);
} catch (FindFailed e) {
e.printStackTrace();
}
}
} catch (FindFailed e) {
e.printStackTrace();
}

Thread.sleep(5000);
}

}

}

-- 
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 #292731]: UnicodeDecodeError: 'unicodeescape' codec can't decode

2016-05-03 Thread lydia
Question #292731 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/292731

lydia posted a new comment:
For example, my code is to deploy some ear file in websphere, I need to
input the ear file path, like this: C:\temp\test.ear

Some code is like this:

type("1461890665807.png", "C:\temp\test.ear")

How can I avoid this?

-- 
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 1577936] [NEW] runsikulix -s with folder

2016-05-03 Thread Karl
Public bug reported:

I am using:
 Sikuli 1.1.0-201510051707
Windows 10 64bit

Summary: I added a folder between the run server folder and the test folder 
like this:  C:\Users\User\sikulixrunserver\test1\test.sikuli
In order to get this to work I needed to add another test1 folder inside the 
.sikuli folder and then copy the .py to it.  The server isn't using this one. 

This is the error I got (notice the folder is added twice):
FAIL 200 runScript: script not found, not valid or not supported 
C:\Users\User\sikulixrunserver\test1\test.sikuli\test1\test.py
[info] RunServer: now waiting on port: 50001 at x.x.x.x

I created the other 'test1' folder inside the .sikuli folder and moved
the .py and .png into it, but that didn't work.

Output:
+++ running this Java
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
+++ trying to run SikuliX
+++ using: -Xms64M -Xmx512M -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine -jar 
c:\vagrant\sikulix.jar -s
[info] RunServer: Starting: trying port: 50001
[info] RunServer: now waiting on port: 50001 at 192.168.0.1
http://localhost:50001/scripts/home/sikulixrunserver
[info] RunServer: now handling client: 
Socket[addr=/0:0:0:0:0:0:0:1,port=49342,localport=50001]
[info] RunServer: processing: 
[info] RunServer: returned:
HTTP/1.1 200 OK

PASS 200 scriptFolder now: C:\Users\User\sikulixrunserver
[info] RunServer: now waiting on port: 50001 at 192.168.0.1
[info] RunServer: now handling client: 
Socket[addr=/0:0:0:0:0:0:0:1,port=49343,localport=50001]
[info] RunServer: processing: 
[info] RunServer: returned:
HTTP/1.1 200 OK

http://localhost:50001/run/test1/test
FAIL 200 runScript: script not found, not valid or not supported 
C:\Users\User\sikulixrunserver\test1\test.sikuli\test1\test.py

[info] RunServer: now waiting on port: 50001 at 192.168.0.1
[info] RunServer: now handling client: 
Socket[addr=/0:0:0:0:0:0:0:1,port=49344,localport=50001]

###Move .py and image to C:/Users/User/sikulixrunserver/test1/test.sikuli/test1
http://localhost:50001/run/test1/test
[info] RunServer: processing: 
[debug] ImagePath: new BundlePath:
/C:/Users/User/sikulixrunserver/test1/test.sikuli/
[debug] JythonSupport: init: starting
[debug] JythonSupport: init: success
[debug] JythonSupport: SikulixForJython: init: starting
[debug] RunTimeIDE: resourceLocation: (class org.sikuli.ide.SikuliIDE) 
/Lib/sikuli/Sikuli.py
[debug] JythonSupport: sikuli/*.py is on Jython::sys.path at:
C:\vagrant\sikulix.jar\Lib
[debug] JythonSupport: SikulixForJython: init: success
[debug] Jython: sikuli: Sikuli: starting init
[debug] RunTimeIDE: loadLib: VisionProxy.dll
[debug] Mouse: init
[debug] KeyBoard: init
[debug] RunTimeIDE: loadLib: WinUtil.dll
[debug] Jython: requested to use as default region: R[0,0 1152x864]@S(0)
[debug] Jython: sikuli: Sikuli: ending init
[debug] Runner: givenScriptName:
C:\Users\User\sikulixrunserver\test1\test.sikuli
[error] FileManager: Script project 
C:\Users\User\sikulixrunserver\test1\test.sikuli
 has no script file test.xxx
[info] RunServer: returned:
HTTP/1.1 503 Service Unavailable

FAIL 503 startRunner Python: not possible or crashed with exception
[info] RunServer: now waiting on port: 50001 at 192.168.0.1
[info] RunServer: now handling client: 
Socket[addr=/0:0:0:0:0:0:0:1,port=49345,localport=50001]
[info] RunServer: processing: 
[info] RunServer: returned:
HTTP/1.1 200 OK

FAIL 200 runScript: script not found, not valid or not supported 
C:\Users\User\sikulixrunserver\test1\test.sikuli\test1\test.py
###Copy .py back into C:/Users/User/sikulixrunserver/test1/test.sikuli/
http://localhost:50001/run/test1/test
[info] RunServer: now waiting on port: 50001 at 192.168.0.1
[info] RunServer: now handling client: 
Socket[addr=/0:0:0:0:0:0:0:1,port=49346,localport=50001]
[info] RunServer: processing: 
[debug] Runner: givenScriptName:
C:\Users\User\sikulixrunserver\test1\test.sikuli
[debug] Runner: Trying to run script:
C:\Users\User\sikulixrunserver\test1\test.sikuli\test.py
[debug] ImagePath: duplicate not added: 
/C:/Users/User/sikulixrunserver/test1/test.sikuli/
[debug] Region: find: waiting 3.0 secs for 1459980543766.png to appear in R[0,0 
1152x864]@S(0)
[error] Image: could not be loaded: 
file:/C:/Users/User/sikulixrunserver/test1/test.sikuli/1459980543766.png
[error] Image: Image not valid, but TextSearch is switched off!
[error] JythonSupport: execFile: returns:
Traceback (most recent call last):
  File "C:\Users\User\sikulixrunserver\test1\test.sikuli\test.py", line 1, in 

click("1459980543766.png")
  Line 2535, in file Region.java

at org.sikuli.script.Region.wait(Region.java:2535)
at org.python.proxies.sikuli.Region$Region$0.super__wait(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at 

Re: [Sikuli-driver] [Question #293145]: Can Sikuli detect if a App or WindowClass is focused or not? if not, is there any workaround?n

2016-05-03 Thread eduardobedoya
Question #293145 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293145

eduardobedoya gave more information on the question:
very bad :(
it has past almost half a year, since I last used Sikuli, but still not support 
on this matter, isn't there any workaround?? what about this??? 
https://answers.launchpad.net/sikuli/+question/235183

Thanks Advanced.

-- 
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 #293145]: Can Sikuli detect if a App or WindowClass is focused or not? if not, is there any workaround?n

2016-05-03 Thread eduardobedoya
Question #293145 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293145

Status: Answered => Open

eduardobedoya is still having a problem:
very bad :(
I has past almost half a year, since I last used Sikuli, but still not support 
on this matter, isn't there any workaround?? what about this??? 
https://answers.launchpad.net/sikuli/+question/235183

Thanks Advanced.

-- 
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 #293205]: Using Excel data as input, im stuck here! :(

2016-05-03 Thread Stephan Timmers
New question #293205 on Sikuli:
https://answers.launchpad.net/sikuli/+question/293205

Hi,

My idea is to let SikuliX:
> start at a point
> fill in first number on a list (Excel)
> complete entire script
> end at starting point
> fill in next number (Excel)

I have written the script and i will paste it below. I dont think the images 
work, i'm very new to this forum and would like to know if i can enhance the 
way i preview my script to you guys. 

wait("1462293000284.png")
click("1462293000284.png")
wait("1462293050774.png",2000)
click("1462293050774.png")
wait("1462293083605.png",2000)
click("1462293083605.png")
wait("1462293111878.png",2000)
doubleClick(Pattern("1462293111878.png").targetOffset(-37,11))
'Here should the value from A2 (Excel) be filled in'
paste("value from A2"\n)
wait("1462293510916.png",2000)
doubleClick(Pattern("1462293510916.png").targetOffset(169,0))
'Here should the value from B2 (Excel) be filled in'
paste("value from B2"\n)
wait("1462293671098.png",2000)
click(Pattern("1462293671098.png").targetOffset(123,78))
waitVanish("1462293671098.png",2000)
doubleClick(Pattern("1462293761014.png").targetOffset(248,1))
'Here should the value from C2 (Excel) be filled in'
paste("value from C2"\n)
doubleClick(Pattern("1462293931637.png").targetOffset(240,0))
'Here should the value from C2 (Excel) be filled in'
paste("value from C2"\n)
wait("1462294030778.png",2000)
click(Pattern("1462294030778.png").targetOffset(109,44))
waitVanish("1462294030778.png",2000)
'At this point I would want the script to loop with the values of A3, B3 and C3 
untill it reaches an empty cell then end'

Below a link to:
1. A document with my script with images. 
2. The Excel file in .xls (as I have read .xlsx doesn't work).

WeTransfer link to above files:
https://we.tl/XrG8qNpa8y

I thank all of you who spare time to help me in advance,
Greetings, Stephan, 24 year old Dutch newbie.

-- 
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 #293197]: How can I call the Pattern Settings screen without using the SikuliX IDE

2016-05-03 Thread RaiMan
Question #293197 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293197

Status: Open => Answered

RaiMan proposed the following answer:
sorry, not possible (easily).

It is hard-wired into the code of the IDE.

But if you are an experienced Java-programmer you might look into the
hell-of-a-code ;-) and find a solution.

the top class is sikulix::org.sikuli.ide.PatternWindow which extends
JFrame.

I have no idea, what effort it might be, to isolate the feature to use it 
standalone.
But if you go in this direction, come back with any question.

version 2 will have this feature, so you might use it in your
scripts/programs - but this does not help you now ;-)

-- 
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 #293197]: How can I call the Pattern Settings screen without using the SikuliX IDE

2016-05-03 Thread klaassmit007
New question #293197 on Sikuli:
https://answers.launchpad.net/sikuli/+question/293197

Hello Herr Hocke,
I want to call the Pattern Settings screen using the filename of the pattern.
Is it possible to use PatternWindow and how (which parameters to use)?
Gr., Klaas

-- 
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 #292731]: UnicodeDecodeError: 'unicodeescape' codec can't decode

2016-05-03 Thread RaiMan
Question #292731 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/292731

Status: Open => Answered

RaiMan proposed the following answer:
So where exactly is the offending \ ?

paste some code.

-- 
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 #292731]: UnicodeDecodeError: 'unicodeescape' codec can't decode

2016-05-03 Thread lydia
Question #292731 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/292731

lydia posted a new comment:
Is there any workaround for this situation?

-- 
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 #292731]: UnicodeDecodeError: 'unicodeescape' codec can't decode

2016-05-03 Thread lydia
Question #292731 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/292731

Status: Answered => Open

lydia is still having a problem:
It seems delete the \ , it can run. But can't qualify my request.

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