Re: [Sikuli-driver] [Question #232802]: [HowTo] control parallel processing of handlers from different background observe() ?

2013-07-22 Thread Aravind
Question #232802 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/232802

Status: Answered = Solved

Aravind confirmed that the question is solved:
Thanks RaiMan, that solved my question.

-- 
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 : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #169927]: how to operate a date picker with click()

2013-07-22 Thread RaiMan
Question #169927 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/169927

RaiMan proposed the following answer:
I meant pasting the date text into the spreadsheet field left of the
picker? does not work?

Ok, if really not:
- the picker is contained in some fixed area of the screen relative to the 
position of other GUI elements
- it has a header with the 2 month-switch buttons
- a header with the weekday letters 
- and it has a fixed day-table with 7 columns and 5 rows

- the position of the day in the table can be calculated using the date 
functions
- the corresponding click positions can be measured/calculated once based on 
the GUI elements geometrics and then selected with the days table position 

day = (row, column) # row 0 ... 4, column 0 ... 7
refPoint = center of top left day position
clickPoint = refPoint.offset(row*day_width, column*day_height)

challenges that might be left:
- find the current position of the picker
- assure it shows the wanted month

-- 
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 : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #232837]: can sikuli 1.0 and selenium 2 be used together in jython scripts?

2013-07-22 Thread RaiMan
Question #232837 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/232837

Status: Open = Answered

RaiMan proposed the following answer:
yes you can ;-)

Google is your friend.

-- 
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 : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Question #232844]: Can Sikuli search the sub-folders to find screenshots?

2013-07-22 Thread Parn Yin
New question #232844 on Sikuli:
https://answers.launchpad.net/sikuli/+question/232844

For example, suppose I have put some screenshots under different folders under 
C:\Test:

C:\Test\Cat
C:\Test\Login
C:\Test\Module1
C:\Test\Module2
...

Then I use setBundlePath to set the C:\Test as my screenshot folder, but Sikuli 
can't find the screenshots under C:\Test\Login.
(1) Excuse me, is there a way to make it work for sub-folders?
If not, should I change the screenshot folder before using different Sikuli 
scripts?
I don't want to add all possible paths into BundlePath because I guess this may 
affect the searching performance. Am I right?

By the way, I have another question:
(2) 
I've read this: http://doc.sikuli.org/globals.html#getImagePath
However, I am still not clear about the difference between ImagePath and 
BundlePath.
Excuse me, when should I use ImagePath and when should I use BundlePath?

Thank you.

-- 
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 : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #232844]: Can Sikuli search the sub-folders to find screenshots?

2013-07-22 Thread RaiMan
Question #232844 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/232844

Status: Open = Answered

RaiMan proposed the following answer:
- the standard place, Sikuli looks for given images is in the bundle path, 
which is the folder of the source (xxx.sikuli)
- you can get this folder by using getBundlePath() (e.g. to store it for later 
restore, or just to know where you are)
- you can always set the bundle path to any other folder at runtime. Sikuli 
will search there for images from now on until another bundle path is set

So the bundle path is the one place, where Sikuli searches for images at
any time and it must point to the folder, taht contains the image files
(Sikuli does not look into subfolders).

The image path is a collection of more than one path (actually the
bundle path is image path[0], since Sikuli internally always looks for
images along this path (which is the reason for the automagic import
of .sikuli and still finding all images)).

So the image path is a list of places, that is searched for images until
one is found in one of these places (first found wins, so sequence of
paths is relevant and you need some naming convention)

So in your case it depends on the usage of the subfolders, what is the best 
choice:
- sequential usage: setBundlePath()
- concurrent usage: use image path feature

But I just thought, it might be a good idea, to allow one folder to be set as 
bundle path and Sikuli will search all contained subfolders for an image file. 
I will put it on the request list.
e.g. setBundlePath(some_folder, tree=true)

-- 
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 : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #232844]: Can Sikuli search the sub-folders to find screenshots?

2013-07-22 Thread RaiMan
Question #232844 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/232844

Assignee: None = RaiMan

-- 
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 : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Question #232860]: (Franco-Provençal) impossible to install openCV 2.1 with fedora 17

2013-07-22 Thread sabulinuo nuo
A question was asked in a language (Franco-Provençal) spoken by
none of the registered Sikuli answer contacts.

https://answers.launchpad.net/sikuli/+question/232860

Hi 

I had to install really quickly sikuli and use it in a java code with fedora 17 
environnment

I couldn't I had to correct code source of library openCV 2.1 and it still 
doesnt work
the command make stops at 70% impossible to correct again code source the bug 
is directly located in a so library :@@@

Had someone managed to install it? is there another working version of OpenCV 
usable for sikuli? 2.4 and 2.2 didn't work ...

I still have this error java.lang.UnsatisfiedLinkError: 
/tmp/tmplib/libVisionProxy.so: libml.so.2.1: cannot open shared object file: No 
such file or directory

It s really desperate I already had to give up another testing framework 
because it couldn't support chromium browser



-- 
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 : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #232736]: Is there a way I can just press CTRL and ALT ?

2013-07-22 Thread srijith
Question #232736 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/232736

Status: Answered = Solved

srijith confirmed that the question is solved:
Thanks RaiMan, that solved my question.

-- 
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 : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #231755]: How to call sikuli script within another sikuli script

2013-07-22 Thread Brett Crossley
Question #231755 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/231755

Brett Crossley posted a new comment:
I had this same issue. Turns out it's because when you rename a file nothing 
renames the .py and .html files inside the directory. 
I changed mine and now it works. 
Also - you can't use _ in file names it seems.

-- 
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 : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Question #232881]: Finder - how to match multiple sub-images within a captured image

2013-07-22 Thread Ryan Paterson
New question #232881 on Sikuli:
https://answers.launchpad.net/sikuli/+question/232881

Attempting to scan a previously saved screen capture.  The screen capture 
contains multiple (similar) blocks of data.  Each block contains three fields. 
Field 1 is a unique identifier, Field 2 will vary and must be ignored, Field 3 
contains the content that will pass/fail this test step, but that content can 
also appear in other blocks of data.  

Desired Algorithm Pseudo Code:
full_block = Pattern( image1.png ).similar(0.70) # image of block to find
field1 = Pattern(subimage1.png).similar(0.95) # a sub-image of image1.png, 
can uniquely identify the block
field2 = Pattern(subimage2.png) # sub-image of image1.png, a field to ignore, 
we won't do anything with it
field3 = Pattern(subimage3.png).similar(0.95) # sub-image of image1.png, 
important field (can exist in multiple blocks, but we're checking to see if it 
exists in this block)

f = Finder( path\previouslyCapturedImage.png )
f.findAll(full_block) # search previouslyCapturedImage.png, will return 
multiple matches 
while f.hasNext():
  current_match = f.next() 
  if current_match.find( field1 ):
# We've uniquely the block, check unique identifier field1
if current_match.find(field3):
   print Correct information found!
else:
   print Incorrect information found!
# We can exit now because we found unique identifier field1
break
  else:
# no match on unique identifier field 1, this means current_match 
is a different block, so skip to the next one
continue

This style of code works when using the Screen as the target of the find 
commands, but doesn't appear to work when using a previously saved image of the 
screen as the target. Any ideas on how to accomplish something similar? If my 
example isn't clear enough please let me know.
  


-- 
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 : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #232844]: Can Sikuli search the sub-folders to find screenshots?

2013-07-22 Thread Parn Yin
Question #232844 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/232844

Status: Answered = Open

Parn Yin is still having a problem:
Excuse me RaiMan, could you please kindly help me when you have time?
Thank you.

-- 
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 : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #232844]: Can Sikuli search the sub-folders to find screenshots?

2013-07-22 Thread Parn Yin
Question #232844 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/232844

Parn Yin posted a new comment:
Hi RaiMan, I see.
Thank you for the quick and detailed explanation!!!

By the way, I have another python question.
Sorry, I just have been started to learn python since last month...

In my automation test, I created 2 functions to set the module path and the 
BundlePath, which use the path as parameter.
For example, the one for BundlePath:

def set_screenshot_path(my_screenshot_path):
if not os.path.isdir(my_screenshot_path):
print ([EXCEPTION]  + my_screenshot_path +  does not exist.)
raise Exception
print (The screenshot path is  + str(getBundlePath()))
if not my_screenshot_path in str(getBundlePath()):
setBundlePath(my_screenshot_path)
print ([SETTING] Change the screenshot path to my_screenshot_path.)
print (The screenshot path is  + str(getBundlePath()))

Then there is a problem about escape character.
For example, if the user assign C:\test\new as the my_screenshot_path, the 
path can't be get correctly becuase of the \t and \n.

Is there a way to read the raw input from it?
I searched the google but failed to find a good solution.
e.g. there is one but it has no answer:
http://stackoverflow.com/questions/9457676/python-escape-character-when-parameter-is-a-path-windows

Excuse me RaiMan, could you please kindly help me when you have time?
Thank you.

-- 
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 : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp