[Sikuli-driver] [Question #259792]: How to clear the text in the text box before entering a new one?

2014-12-27 Thread Meg
New question #259792 on Sikuli:
https://answers.launchpad.net/sikuli/+question/259792

I'm doing some sort of form validation. I find the image of the text box and 
then type the password I want to enter. Now when this is in a loop, the 
password that gets typed in the text box gets added after the earlier password 
and doesn't overwrite the earlier one. How to overcome this problem?

-- 
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 #259790]: Region from image file

2014-12-27 Thread MCK
New question #259790 on Sikuli:
https://answers.launchpad.net/sikuli/+question/259790

I have some very complex image matching I'm doing as part of my application.

Rather than tie up the computer for that long, I'd rather use Sikuli to take 
the necessary screenshots than have Sikuli work against the save PNG files thus 
freeing up the computer for other uses.

i've found the Finder class.  The problem is that class doesn't have the full 
features to treat the saved PNG file like the Screen object.  I can't narrow 
focus to a specific Region of the image to match on, can't capture a Region of 
the image, etc...

How do I get the Finder class to have all the features of Screen/Region ?

-- 
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 #259773]: Receive data from GET request

2014-12-27 Thread fordox
Question #259773 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/259773

Description changed to:
Hello.
Is it possible for Sikuli  to do the following:

1. Sikuli script makes a request to page: http://example.com/get.php
2. get.php sends us back GET request: 

vr=50-100

the GET request result is always different

3. When sikuli takes each variable from the received request and uses it, 
substituting the values. When I use it in the following code:
...
if now.hour >= 0 and now.hour < 1:   # 00:00 - 01:00
# send request to http://example.com/get.php and receive a reply
# If from http://example.com/get.php no response is received - to 
try to get it again
mytime = random.randint (50, 100) # received from the GET request - 
vr
if now.hour >= 1 and now.hour < 2:   # 01:00 - 02:00
# send request to http://example.com/get.php and receive a reply
# If from http://example.com/get.php no response is received - to 
try to get it again
mytime = random.randint (100, 150) # received from the GET request 
- vr
if now.hour >= 2 and now.hour < 3:   # 02:00 - 03:00
# send request to http://example.com/get.php and receive a reply
# If from http://example.com/get.php no response is received - to 
try to get it again
mytime = random.randint (200, 300) # received from the GET request 
- vr

wait (mytime)
...

-- 
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 #259773]: Receive data from GET request

2014-12-27 Thread fordox
New question #259773 on Sikuli:
https://answers.launchpad.net/sikuli/+question/259773

Hello.
Is it possible for Sikuli  to do the following:

1. Sikuli script makes a request to page: http://example.com/get.php
2. get.php sends us back GET request: 

vr=50-100

the GET request result is always different

3. When sikuli takes each variable from the received request and uses it, 
substituting the values. When I use it in the following code:
...
if now.hour >= 0 and now.hour < 1:   # 00:00 - 01:00
# send request to http://example.com/get.php and receive a reply
# If from http://example.com/get.php no response is received - to 
try to get it again
time = random.randint (50, 100) # received from the GET request
mytime = vr
if now.hour >= 1 and now.hour < 2:   # 01:00 - 02:00
# send request to http://example.com/get.php and receive a reply
# If from http://example.com/get.php no response is received - to 
try to get it again
time = random.randint (100, 150) # received from the GET request
mytime = vr
if now.hour >= 2 and now.hour < 3:   # 02:00 - 03:00
# send request to http://example.com/get.php and receive a reply
# If from http://example.com/get.php no response is received - to 
try to get it again
time = random.randint (200, 300) # received from the GET request
mytime = vr

wait (mytime)
...

-- 
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 #258957]: Integrating sikuli with android webdriver

2014-12-27 Thread Launchpad Janitor
Question #258957 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/258957

Status: Open => Expired

Launchpad Janitor expired the question:
This question was expired because it remained in the 'Open' state
without activity for the last 15 days.

-- 
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 #259577]: Is there a way to discard the background while image compareing

2014-12-27 Thread RaiMan
Question #259577 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/259577

RaiMan proposed the following answer:
the feature findAny will be available in version 1.2 and it will be
threaded internally (the searches are done in parallel).

-- 
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 #259577]: Is there a way to discard the background while image compareing

2014-12-27 Thread RaiMan
Question #259577 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/259577

RaiMan proposed the following answer:
@Eugene
thanks for your solution.
... I have some optimisations:

# import time # not necessary since already done by Sikuli

def findAny(thelist, theregion=SCREEN, timeout=False):
if not timeout:
timeout=theregion.getAutoWaitTimeout()
res=None
exit_time=time.time()+timeout
while not res and time.time()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 #259577]: Is there a way to discard the background while image compareing

2014-12-27 Thread Eugene Maslov
Question #259577 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/259577

Eugene Maslov proposed the following answer:
Sorry, this corrected function processes second image in the list
quicker. Please discard the code in the answer #2.

import time

def findAny(thelist, theregion=SCREEN, timeout=False):
if not timeout:
timeout=theregion.getAutoWaitTimeout()
res=None
start_time=time.time()
exit_time=start_time+timeout
while time.time()<=exit_time:
for s in thelist:
found=theregion.exists(s,0)
if found:
res=found
break
if res:
break
return res


#usage:
thereg=Region(324,321,648,429)
findAny(["btn_bg1.png","btn_bg2.png","btn_bg3.png"], thereg,timeout=20).click()

-- 
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 #259577]: Is there a way to discard the background while image compareing

2014-12-27 Thread Eugene Maslov
Question #259577 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/259577

Eugene Maslov proposed the following answer:
@Anunaya

If the icons are semi-transparent, so that cropping doesn't help, it's still 
possible to make several screenshots of the icons for each background and send 
it to a function selecting the best of them.
I mostly use this way for blinking buttons, which change their color with time.

It can be like that:

def findAny(thelist, theregion=SCREEN, timeout=False):
if not timeout:
timeout=theregion.getAutoWaitTimeout()
res=None
i=0
for s in thelist:
if i==0:
t=timeout
else:
t=0
found=theregion.exists(s,t)
i+=1
if found:
res=found
break
return res
#usage:
thereg=Region(324,321,648,429)
findAny(["btn_bg1.png","btn_bg2.png","btn_bg3.png"], thereg,timeout=20).click()

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