Re: [Sikuli-driver] [Question #272199]: Having trouble working with simple Patterns?

2015-10-08 Thread RaiMan
Question #272199 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/272199

Status: Open => Answered

RaiMan proposed the following answer:
you have to decide for Python or Java ;-)

your snippet is neither correct Java nor correct Python!

pImage = Patter("1444307235161.png").targetOffset(0,-30)
click(pImage) # this clicks with the given offset to the center of the image

... now before copying you have to extend the selection somehow i guess

type("c", KeyModifier.CTRL)
data[26] = Env.getClipboard()

-- 
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 #272199]: Having trouble working with simple Patterns?

2015-10-08 Thread RaiMan
Question #272199 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/272199

RaiMan posted a new comment:
OK, I feel with you ;-)

the SikuliX sample world is really scattered over the net.

I am sure during the next months with version 2 I will decide for a
better solution.

-- 
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 #272199]: Having trouble working with simple Patterns?

2015-10-08 Thread Sam
New question #272199 on Sikuli:
https://answers.launchpad.net/sikuli/+question/272199

I'm just trying to copy some text, but I need it to click either at the very 
top of my image or slightly above it. 

Right now I'm trying to click at the very top of my image to see if that can 
work.  To do so I need to move the red cross hair from the center of my image 
to the top. To do so,  I had read that the following should work:

Pattern pImage = new ("1444307235161.png").targetOffset(0,-30)
r=s.exists(pImage,1);
click(r, 1)
type("c", KeyModifier.CTRL)
data[26] = Env.getClipboard()

Unfortunately, I'm receiving the following syntax error:
"no viable alternative at input 'pImage'"

Any suggestions? 

Thanks


-- 
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 #272199]: Having trouble working with simple Patterns?

2015-10-08 Thread Sam
Question #272199 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/272199

Status: Answered => Solved

Sam confirmed that the question is solved:
Sorry, I'm using Python. I was just copying off of the Pattern examples
I found which happened to be Java :(.

Not the best programmer/scriptwriter as I haven't been practicing much
since college. So I just google until I can't figure it out.  Using
Sikuli has been a fun intro to get me back into basic Python.

Anyway, you've solved my problem . Thanks!

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