Re: [Sikuli-driver] [Question #283771]: Sikuli error while opening excel sheet

2016-01-27 Thread Manfred Hampl
Question #283771 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/283771

Status: Open => Answered

Manfred Hampl proposed the following answer:
'C:\\Users\rupayan.nath\\Desktop\\Disqualify_offers_export' does not
contain a file extension. Are you sure that this file doesn't have one?
Windows folder options might be set to 'hide extension for known file
types'.

-- 
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 #283771]: Sikuli error while opening excel sheet

2016-01-28 Thread Manfred Hampl
Question #283771 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/283771

Status: Open => Needs information

Manfred Hampl requested more information:
Open the file explorer,
navigate to the file,
do a right click on it,
select properties,
switch to the tab "Details",
scroll down to the heading "File".

What values do you see for the fields "Name" and "Folder path"?

-- 
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 #283771]: Sikuli error while opening excel sheet

2016-02-01 Thread Manfred Hampl
Question #283771 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/283771

Status: Open => Needs information

Manfred Hampl requested more information:
I wanted that you navigate to the excel file, and tell what you see for
name and folder path.

-- 
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 #284705]: stuck in some place :(

2016-02-08 Thread Manfred Hampl
Question #284705 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/284705

Manfred Hampl proposed the following answer:
It seems to me that the value of the noore variable is never changed and
will always be 0. So the test "if noore == 1" will always be false.

-- 
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 #287177]: Breaking out of a Loop with keyboard Input not working!

2016-02-29 Thread Manfred Hampl
Question #287177 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/287177

Status: Open => Answered

Manfred Hampl proposed the following answer:
Maybe a typo error:

Probably should be assignment "A = 10" after "print('BREAK KEY
ACTIVATED!')" instead of comparison "A == 10"

-- 
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 #293503]: Region(x, y, w, h) - what are w and h?

2016-05-09 Thread Manfred Hampl
Question #293503 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293503

Status: Open => Answered

Manfred Hampl proposed the following answer:
Remark, in the example below
http://doc.sikuli.org/region.html#creatingaregionsettingandgettingattributes
there is code using the width value for height assignment. This might be
also misleading.

theWidth = reg.getW()
...
reg.setH(theWidth)

This sets the height of the region equal to the width, i.e. a square
region.

I.m.h.o. a better example would be something like

theWidth = reg.getW()
..
theHeight= theWidth / 2
...
reg.setH(theHeigth)

to avoid using the width value in a height assignment.

-- 
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 #295488]: runScript("powershell E:\\a.bat") Error

2016-06-22 Thread Manfred Hampl
Question #295488 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/295488

Status: Open => Needs information

Manfred Hampl requested more information:
Can you change your e:\a.bat file to do a change directory command as
first step?

e.g.

cd /d e:\
start Monitor

-- 
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 #295488]: runScript("powershell E:\\a.bat") Error

2016-06-22 Thread Manfred Hampl
Question #295488 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/295488

Manfred Hampl posted a new comment:
@RaiMan: I know that this instruction is already part of your first comment.
I tried to give more details, because the original poster apparently needs them.

-- 
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 #295488]: runScript("powershell E:\\a.bat") Error

2016-06-23 Thread Manfred Hampl
Question #295488 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/295488

Status: Open => Answered

Manfred Hampl proposed the following answer:
You have two possibilities for starting commands and scripts:

1. the command (or script) is located in a directory that is part of the path
or
2. you provide the absolute path in the command

I suggest that you do the following:

In sikuli you start the script by providing its full path, e.g. 
runScript("powershell E:\\a.bat")

AND

Inside the E:\a.bat script you also provide the full path for all commands that 
you execute in this script, or you set the path and/or change directory inside 
this script in a way that it works from whatever current directory it is 
started.
This has nothing to do with sikuli, but is plain Windows command and script 
execution.

Have you already tried modifying the E:\a.bat script by adding a change
directory command as the first instruction?

I cannot understand how a "cp - ***" would fail if you provide the full path.
Note: "cp" is the syntax of the copy command on Unix system; on Windows it has 
to be "copy". Maybe that is the cause of an error message.

-- 
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 #303536]: calling the values from the variables instead of hard coding

2016-07-27 Thread Manfred Hampl
Question #303536 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/303536

Status: Open => Answered

Manfred Hampl proposed the following answer:
http://sikulix-2014.readthedocs.io/en/latest/interaction.html#input
describes a possibility to request username and password from the user.
Is this what your are looking for?

-- 
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 #323987]: Defined function is looping

2016-08-05 Thread Manfred Hampl
Question #323987 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/323987

Status: Open => Needs information

Manfred Hampl requested more information:
I see two different but similarly named variables, vSet and vSets, is
that on purpose? vSets is never set!

-- 
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 #327431]: Can we able to automate Google map using Sikuli

2016-08-07 Thread Manfred Hampl
Question #327431 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/327431

Status: Open => Answered

Manfred Hampl proposed the following answer:
How would you do that manually?

Start a web browser
Open Google Maps
click in the google map search box
enter the search term and hit enter
wait a few seconds for the map to show up
locate the red indicator or just position the mouse in the center of the window
do a right click
select "What's here"
and in the answer box read the coordinates.

Just convert this into sikuli steps.

(Maybe using the google maps API would be a more straightforward
approach.)

-- 
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 #365318]: How to Upgrade new version of Ubantu Operating System ?

2016-08-25 Thread Manfred Hampl
Question #365318 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/365318

Status: Open => Answered

Manfred Hampl proposed the following answer:
Please close as a duplicate of
https://answers.launchpad.net/sikuli/+question/365223

-- 
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 #464203]: App.open() not working on Windows Server 2012

2017-02-20 Thread Manfred Hampl
Question #464203 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/464203

Status: Open => Answered

Manfred Hampl proposed the following answer:
Maybe http://stackoverflow.com/a/10558351 helps

-- 
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 #464203]: App.open() not working on Windows Server 2012

2017-02-26 Thread Manfred Hampl
Question #464203 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/464203

Status: Open => Needs information

Manfred Hampl requested more information:
Have you tried app.open("...") instead of app.run("...")?

-- 
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 #612996]: Is it possible to import extern dll file in sikuli script?

2017-04-06 Thread Manfred Hampl
Question #612996 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/612996

Status: Open => Answered

Manfred Hampl proposed the following answer:
https://sourceforge.net/p/jython/mailman/jython-
users/thread/71b0d374-5fd3-4c03-95cd-320e07f04...@gmail.com/ might help

-- 
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 #642404]: Read lines from a file and pause for hotkey?

2017-06-09 Thread Manfred Hampl
Question #642404 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/642404

Status: Open => Answered

Manfred Hampl proposed the following answer:
What exactly do you want? Should the process wait for a key-press after
each line?

In my opinion in such case some kind of popup would be a better choice
than a hotkey, see
http://sikulix-2014.readthedocs.io/en/latest/interaction.html

The hotkey feature better serves the requirements of interrupting the
processing wherever it might be at that moment. What you need seems to
be a decision to wait or continue at a specific point in the processing.

-- 
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 #643548]: AssertionError

2017-06-14 Thread Manfred Hampl
Question #643548 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/643548

Status: Open => Needs information

Manfred Hampl requested more information:
The python instruction "assert False" aborts processing by generating an 
"AssertionError" message.
So what you see is exactly what you have written in your program.

What should the program do in case that the model is not found on
screen?

-- 
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 #644291]: How to get a command to repeat about 10 times

2017-06-20 Thread Manfred Hampl
Question #644291 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/644291

Status: Open => Answered

Manfred Hampl proposed the following answer:
Standard Python syntax
https://wiki.python.org/moin/ForLoop

for n in range(0, 10):
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


Re: [Sikuli-driver] [Question #644291]: How to get a command to repeat about 10 times

2017-06-20 Thread Manfred Hampl
Question #644291 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/644291

Status: Open => Answered

Manfred Hampl proposed the following answer:
You seem to have misformatted the input.
Whitespace is significant in Python.
Python groups statements according to the amount of whitespace in front of it.

"count = 1
 while (count < 10):
 click(Pattern("58679475550934.png").targetOffset(-8,-8))
 count = count + 1"
is wrong, it probably has to be
"count = 1
while (count < 10):
 click(Pattern("58679475550934.png").targetOffset(-8,-8))
 count = count + 1"
denoting that the indented lines (click... and count=count+1) are inside the 
while loop.

Please check with python manuals.

-- 
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 #644291]: How to get a command to repeat about 10 times

2017-06-21 Thread Manfred Hampl
Question #644291 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/644291

Status: Open => Needs information

Manfred Hampl requested more information:
It seems that you have an extra closing bracket somewhere.
Are you sure that the error is caused by one of the lines in your snippet and 
not by some other part of your 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 #645654]: is it possible to make setAutoWaitTimeout() to less than one second, if so how?

2017-06-30 Thread Manfred Hampl
Question #645654 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/645654

Status: Open => Answered

Manfred Hampl proposed the following answer:
From
http://sikulix-2014.readthedocs.io/en/latest/region.html#Region.setAutoWaitTimeout

"Parameters:
seconds – a number, which can have a fraction. The internal granularity is 
milli-seconds."

So you can e.g. set it to half a second with "setAutoWaitTimeout(0.5)"

What masuo wanted to indicate is that it does not make sense to set it
to a value which is smaller than the duration that an exists() command
needs for execution.

-- 
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 #645942]: "while (count < 10):" loop doesn't seem to be working

2017-07-03 Thread Manfred Hampl
Question #645942 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/645942

Manfred Hampl proposed the following answer:
Another potential pitfall: what is the value of count before the loop?
If you re-use a counter from a previous loop, it might already be > 10

-- 
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 #645666]: drag and drop from mouse current location to center of screen

2017-07-03 Thread Manfred Hampl
Question #645666 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/645666

Status: Open => Answered

Manfred Hampl proposed the following answer:
in https://answers.launchpad.net/sikuli/+question/643830 you had

ml = Env.getMouseLocation()
print ml
print ml.getX()
print ml.getY()

If you now omit the first line of that block, you will of course get an
error "name 'ml' is not defined"

Try
dragDrop(Env.getMouseLocation(),Location(640,512))

-- 
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 #646899]: [error] TypeError ( 'int' object is not callable )

2017-07-07 Thread Manfred Hampl
Question #646899 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/646899

Status: Open => Answered

Manfred Hampl proposed the following answer:
What is centerX - a function or an integer variable?
It it is an int, then you must not add brackets "()"
and the same for total.

-- 
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 #646890]: averaging numbers

2017-07-07 Thread Manfred Hampl
Question #646890 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/646890

Status: Open => Answered

Manfred Hampl proposed the following answer:
Is it a forward slash / or a backslash \ ?

What exactly do you want to do?
Drag an image from the mouse location half the ways to the screen center?
Then it is most probably
dragDrop(ml,Location( (ml.getX()+centerX)/2,(ml.getY()+centerY)/2) )

-- 
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 #646899]: [error] TypeError ( 'int' object is not callable )

2017-07-08 Thread Manfred Hampl
Question #646899 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/646899

Status: Open => Answered

Manfred Hampl proposed the following answer:
You need to get better in python basics.

You have to understand the difference between using variables (no
brackets) and calling functions (need brackets).

Look at your code:
...
total = ml.getX+centerX
print ml.getX()
...
In the second line ml.getX has brackets, but in the first line it hasn't.
This cannot be correct in python syntax.

I assume the correct statements are

ml = Env.getMouseLocation()
total = ml.getX() + centerX
print ml.getX
print total

-- 
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 #646899]: [error] TypeError ( 'int' object is not callable )

2017-07-08 Thread Manfred Hampl
Question #646899 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/646899

Manfred Hampl proposed the following answer:
Oops, sorry, now I ommitted brackets, it must of course be

ml = Env.getMouseLocation()
total = ml.getX() + centerX
print ml.getX()
print total

-- 
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 #647264]: Does wait(screenshot), 300) only check once? or 300 times?

2017-07-09 Thread Manfred Hampl
Question #647264 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/647264

Status: Open => Answered

Manfred Hampl proposed the following answer:
Read the manual
http://sikulix-2014.readthedocs.io/en/latest/region.html?highlight=timeout#Region.wait

... If PS is specified, it ==> keeps searching the given pattern in the
region <== until the image appears ... or the specified amount of time
has elapsed. ...

-- 
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 #647264]: Does wait(screenshot), 300) only check once? or 300 times?

2017-07-09 Thread Manfred Hampl
Question #647264 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/647264

Manfred Hampl posted a new comment:
(Remark: I do not know about the frequency of re-searching, I assume
RaiMan can answer that.)

-- 
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 #647305]: Error options in Sikuli?

2017-07-10 Thread Manfred Hampl
Question #647305 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/647305

Status: Open => Answered

Manfred Hampl proposed the following answer:
As already written in another question asked by you: You need to get
better in python basics.

https://docs.python.org/2/tutorial/errors.html#handling-exceptions

You might also do a web search for 'sikuli try except', there are
already some answers to similar questions.

-- 
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 #647320]: Sikuli script from it's own documentation isn't working.

2017-07-10 Thread Manfred Hampl
Question #647320 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/647320

Status: Open => Answered

Manfred Hampl proposed the following answer:
I assume that you are using Sikuli 1.1
The correct documentation for this version is there:
http://sikulix-2014.readthedocs.io/en/latest/globals.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


Re: [Sikuli-driver] [Question #647305]: Error options in Sikuli?

2017-07-11 Thread Manfred Hampl
Question #647305 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/647305

Status: Open => Answered

Manfred Hampl proposed the following answer:
You might need a construction like this

looping statement (for... or while... etc.):
try:
find("path-to-image")
do-some-logic # it is there
except FindFailed:
pass # pattern not found, just ignore it and return to the loop

-- 
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 #647305]: Error options in Sikuli?

2017-07-11 Thread Manfred Hampl
Question #647305 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/647305

Manfred Hampl posted a new comment:
As already written in question 
https://answers.launchpad.net/sikuli/+question/647320
If you are using Sikuli 1.1 and higher, the documentation is there 
http://sikulix-2014.readthedocs.io/en/latest/region.html#Region.setFindFailedResponse

Your link points to the documentation for Sikuli 1.0 only.

-- 
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 #647305]: Error options in Sikuli?

2017-07-11 Thread Manfred Hampl
Question #647305 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/647305

Manfred Hampl posted a new comment:
Your link and my link are pointing to the same document, just to a
position that is a few paragraphs (about 3 pages) different.

Generally I see two options for you:
1. turn off the feature that exceptions are raised when an image is not found 
(setFindFailedResponse)
or
2. use exception handling  (try: ... except: ...) in those cases where you 
suspect that the image might be not present on the screen (but leave exception 
signaling enabled).

-- 
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 #649155]: Set Password

2017-07-16 Thread Manfred Hampl
Question #649155 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/649155

Status: Open => Answered

Manfred Hampl proposed the following answer:
There is no logic in your program to validate the code that has been
entered.

You need to compare the entered value with the desired password,
something like

if ok != "TheHiddenSecret":
   exit(1)

see also http://sikulix-2014.readthedocs.io/en/latest/interaction.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


Re: [Sikuli-driver] [Question #653759]: How to fetch the cell value of excel sheet

2017-07-27 Thread Manfred Hampl
Question #653759 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/653759

Status: Open => Answered

Manfred Hampl proposed the following answer:
See the last paragraph of faq 2208

*** looking for docs
 xlrd1 is based on the original xlrd - download from here
http://pypi.python.org/packages/source/x/xlrd/xlrd-0.7.1.zip

This one contains some useful docs and examples in the contained xlrd
folder and you might use this one as well.

(Remark: the current version of xlrd is 1.0.0)

**Quick start**:

```
import xlrd
book = xlrd.open_workbook("myfile.xls")
print "The number of worksheets is", book.nsheets
print "Worksheet name(s):", book.sheet_names()
sh = book.sheet_by_index(0)
print sh.name, sh.nrows, sh.ncols
print "Cell D30 is", sh.cell_value(rowx=29, colx=3)
for rx in range(sh.nrows):
print sh.row(rx)
# Refer to docs for more details.
# Feedback on API is welcomed.

```

-- 
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 #653769]: How to run a executable query in Oracle -Sql Developer

2017-07-28 Thread Manfred Hampl
Question #653769 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/653769

Status: Open => Answered

Manfred Hampl proposed the following answer:
How do the contents of the excel file map to the elements of the line?

What does the excel cell contain? the EMP_ID or the EMP_NAME or the
complete line "917,'Muthu','Covai','PA','BE',21", or...?

You probably have to use string concatenation.
Assuming the following:
row 41 column 31 contains the EMP_ID
row 41 column 32 contains the EMP_NAME
row 41 column 33 contains the EMP_ADDRESS
etc.
Then the following should work
text_file.write("Insert into emp_details 
(EMP_ID,EMP_NAME,EMP_ADDRESS,DESIGNATION,QUALIFICATION,AGE) values 
("+str(sheet.cell_value(40,30))+",'"+sheet.cell_value(40,31)+"','"+sheet.cell_value(40,32)+"','"+sheet.cell_value(40,33)+"','"+sheet.cell_value(40,34)+"',"+str(sheet.cell_value(40,35))+");")
You have to build a long string with contents that are very similar to the line 
that you created manually, containing quote and comma characters in the same 
sequence.

(Remark: check "string concatenation" in the python manuals)

-- 
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 #653769]: How to run a executable query in Oracle -Sql Developer

2017-07-28 Thread Manfred Hampl
Question #653769 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/653769

Status: Open => Answered

Manfred Hampl proposed the following answer:
If the value in cell row 33 column 31 is "exec ... 50);"
then you just have to do

text_file.write(sheet.cell_value(32,30))

-- 
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 #654025]: How to get click event value

2017-07-28 Thread Manfred Hampl
Question #654025 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/654025

Status: Open => Answered

Manfred Hampl proposed the following answer:
See the documentation
http://sikulix-2014.readthedocs.io/en/latest/interaction.html#input for
getting a string from the popup window.

You probably need something like

newvalue = input("Please enter the new value:")

and then construct a SQL-statement that uses the value in variable
newvalue using string concatenation, something like

sqlstatement = "UPDATE tablename WHERE searchkey = keyvalue SET
columnname="+newvalue

(details depending on the syntax rules that have to be followed for your
update statement)

-- 
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 #654029]: import xlrd method not copying numbers

2017-07-28 Thread Manfred Hampl
Question #654029 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/654029

Status: Open => Answered

Manfred Hampl proposed the following answer:
You have to convert the numeric value into a string.
masuo has already given an example how to identify the type of the value from 
excel in  another question.
If it is numeric, then you have to use the str() function first.

-- 
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 #653769]: How to run a executable query in Oracle -Sql Developer

2017-07-28 Thread Manfred Hampl
Question #653769 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/653769

Manfred Hampl posted a new comment:
You cannot give more than one cell address to  sheet.cell_value() and
similar functions, but you have to use some kind of loop statements.

something similar to

...
sheet = book.sheet_by_index(0)

text_file = open("Output.sql", "w")

for rx in range(sh.nrows):
text_file.write(sheet.cell_value(rx,33)
text_file.write("\ncommit;")

text_file.close()

This loops through all rows. If this is not correct, e.g. because the
data start only in row 20, you have to formulate the looping statement
different, probably something like

for rx in range(20, sheet.nrows):

This is python coding. You should try improving your knowledge in python
programming.

-- 
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 #654029]: import xlrd method not copying numbers

2017-07-28 Thread Manfred Hampl
Question #654029 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/654029

Status: Open => Answered

Manfred Hampl proposed the following answer:
see https://answers.launchpad.net/sikuli/+question/653759

Try

...
celltype = sheet.cell_type(40,33)
value = sheet.cell_value(40,33)
if celltype == 2:
 value = str(value)
...
paste(value)

-- 
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 #654252]: While opening a particular script: index out of range error displayed

2017-07-31 Thread Manfred Hampl
Question #654252 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/654252

Status: Open => Needs information

Manfred Hampl requested more information:
Can you post the contents of your script, either here, or in
pastebin.ubuntu.com, or somewhere else?

-- 
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 #653769]: How to run a executable query in Oracle -Sql Developer

2017-07-31 Thread Manfred Hampl
Question #653769 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/653769

Status: Open => Answered

Manfred Hampl proposed the following answer:
As far as I know the parameters are
sheet.cell_value(row,column)

In which row(s) and column(s) are your data?

If it is
row 40 col 33
row 41 col 33
row 42 col 33
then you have to loop over the rows as proposed in comment #12.

I suggest that you do debugging with print statements. something like

print "number of rows: " + str(sh.nrows)
for rx in range(sh.nrows):
 print "in row: " + str(rx)
 print "contents: " + sheet.cell_value(rx,33)
 text_file.write(sheet.cell_value(rx,33))
 text_file.write("\ncommit;")

etc. to see how the script is processing through the rows.

-- 
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 #654090]: How to sort without search option in python

2017-08-01 Thread Manfred Hampl
Question #654090 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/654090

Status: Open => Answered

Manfred Hampl proposed the following answer:
How do you know which line to select? What are the selection criteria?

Some ideas:
Do a searchall for the empty selection box, store the vertical and horizontal 
positions for the first one in variables.
Calculate the difference in vertical positions between the first and the second 
ones.
If you know that you have to select the n-th line, do a click on 
(horizonalpos1, verticalpos1 + (n-1)*verticaldiff)

-- 
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 #654090]: How to sort without search option in python

2017-08-01 Thread Manfred Hampl
Question #654090 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/654090

Status: Open => Answered

Manfred Hampl proposed the following answer:
Sorry, it is not possible for me to provide a sample script. I do not know any 
details about the program that you want to control with Sikuli, and so I cannot 
verify whether any sample code could really work.
I do not see a chance that somebody else is able to develop such script without 
having access to this application.
It seems that you have to develop that yourself.

-- 
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 #653769]: How to run a executable query in Oracle -Sql Developer

2017-08-01 Thread Manfred Hampl
Question #653769 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/653769

Status: Open => Answered

Manfred Hampl proposed the following answer:
You just have to replace

for rx in range(sheet.nrows):
  print "contents: " + sheet.cell_value(rx,33)

by

for rx in range(sheet.nrows):
 text_file.write(sheet.cell_value(rx,33))

-- 
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 #653769]: How to run a executable query in Oracle -Sql Developer

2017-08-01 Thread Manfred Hampl
Question #653769 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/653769

Status: Open => Answered

Manfred Hampl proposed the following answer:
If text_file.write(...) already worked in comments #2 and #5, why should
it stop working now?

Please debug your script by adding print statements for verifying the
contents of the variables at execution 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 #654441]: multiple screenshot analysis in a script

2017-08-02 Thread Manfred Hampl
Question #654441 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/654441

Status: Open => Answered

Manfred Hampl proposed the following answer:
It seems to me that your code snippet in comment #1 is nonsense.
In the first if you have "break" in both the "true" and the "else" branches, 
meaning that the loop will be terminated in any case and the next if will never 
be reached.

Please describe:
What should happen if the first image is found and
What should happen if the first image is not found?

I understood that you are trying to identify certain signals on stock quote 
graphics, isn't it?
Due to the fact that there can be an enormous variation in the visual 
appearance, I have doubts whether it will easily be possible to use Sikuli's 
image comparison functionality for this purpose.
Maybe an approach to download a certain amount of historical data and doing 
calculations on the numbers might work better.

-- 
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 #653769]: How to run a executable query in Oracle -Sql Developer

2017-08-02 Thread Manfred Hampl
Question #653769 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/653769

Status: Open => Answered

Manfred Hampl proposed the following answer:
You need to have the statements

 text_file.write(value) ## Here i am passing the column 33 values=2 executable 
queries
 text_file.write(Key.ENTER)
 text_file.write("/")
 text_file.write("\ncommit;")

inside the
"for rx in range(sheet.nrows):"
loop.

Please consult the Python manuals to learn how to correctly use indents
for grouping statements.

-- 
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 #654441]: multiple screenshot analysis in a script

2017-08-02 Thread Manfred Hampl
Question #654441 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/654441

Status: Open => Answered

Manfred Hampl proposed the following answer:
If you have limited number of images, you could use something like

while True:
  if exists(Pattern("image seen as of monday").targetOffset(-16,-58)):
  print('found 1st image')
  elif exists(Pattern("image seen as of tuesday").targetOffset(-16,-58)):
  print('found 2nd image')
  elif exists(Pattern("image seen as of wednesday").targetOffset(-16,-58)):
  print('found 3nd image')
  else:
  print('none of the images found')
  break # retry from the beginning
  hover(getLastMatch())
  #do the real action

With a varying list of images for checking, the case is a bit more complicated.
There are possibilities to loop through all files in a directory, and you would 
then have to use them in sequence in a exists() statement in a loop until you 
have found a match (or no match at all).
See python documentation for os.path.walk or os.walk (depending on your python 
version)

-- 
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 #654441]: multiple screenshot analysis in a script

2017-08-02 Thread Manfred Hampl
Question #654441 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/654441

Manfred Hampl proposed the following answer:
Oops, wrong,
instead of "break" you have to use "continue" in case that no image was found 
to go back to the beginning of the loop.

-- 
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 #655234]: Multiple else if

2017-08-03 Thread Manfred Hampl
Question #655234 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/655234

Status: Open => Answered

Manfred Hampl proposed the following answer:
The message at the bottom states that it is an indentation error.

All "elif" statements must be at the same indentation level as the "if"
they belong to (and the last "else" as well).

See the Python manual for details how Python uses indentation to group
statements.

-- 
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 #655234]: Multiple else if

2017-08-03 Thread Manfred Hampl
Question #655234 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/655234

Status: Open => Answered

Manfred Hampl proposed the following answer:
There seem to be some extra quotes and parentheses in the line before.

-- 
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 #655234]: Multiple else if

2017-08-03 Thread Manfred Hampl
Question #655234 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/655234

Status: Open => Answered

Manfred Hampl proposed the following answer:
I assume sleep(0.01) isn't long enough, and the multiple clicking will
be interpreted as doubleclick.

-- 
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 #655410]: error when trying to run sikuli script from a batch file

2017-08-07 Thread Manfred Hampl
Question #655410 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/655410

Status: Open => Answered

Manfred Hampl proposed the following answer:
There is a space character in the file name, so you have to put quotes around it
C:\Users\Me\Sikuli\runsikulix.cmd -r "C:\Users\Me\Sikuli\red button.sikuli"
or even better: rename the file not to have embedded special characters.

-- 
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 #655511]: Waiting to do 1 of 2 actions

2017-08-12 Thread Manfred Hampl
Question #655511 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/655511

Status: Open => Answered

Manfred Hampl proposed the following answer:
Your code will only loop i the first "while true:" loop YOu have to put
a "break" statement into the first loop.

-- 
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 #655511]: Waiting to do 1 of 2 actions

2017-08-13 Thread Manfred Hampl
Question #655511 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/655511

Status: Open => Answered

Manfred Hampl proposed the following answer:
Your new code will loop forever in lines 13-15
You probably need a "break" inside this loop to continue processing below that 
part.

Remark:
line 11 seems redundant.
The block in lines 8-10 will loop as long as that blue/red block is visible on 
the screen and ends when it is no more there.
I do not see the need to test whether that block now is not there any more 
(unless it is supposed to immediately re-appear).
In my opinion a simple "break" with a first-level indent would have been enough.

-- 
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 #654244]: Waiting for image, type command, then waits again

2017-08-13 Thread Manfred Hampl
Question #654244 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/654244

Status: Open => Answered

Manfred Hampl proposed the following answer:
For a random letter you can use python standard functions. Something
like

myList=["a","s","d","z","x","c"]
import random
for x in range(50):
  print myList[random.randint(0,5)]

-- 
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 #655511]: Waiting to do 1 of 2 actions

2017-08-13 Thread Manfred Hampl
Question #655511 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/655511

Manfred Hampl proposed the following answer:
In addition to my previous comment:
You are right, the program will loop in the first while block:

A break statement will only escape the innermost loop. So the "break" in line 
12 will not cause the first big loop (lines 2 - 12) to end.
As already written before, there is no need for a while statement in line 11. 
If you replace lines 11-12 with a simple "break" with a first level-indent 
(indented the same amount as line 8), then the "break" will cause an escape 
from the first loop (and lead to a never-ending loop in lines 13-15 as long as 
that part is not corrected).

By the way, I do not really understand why lines 2-12 are packed into a
"while true" loop.

-- 
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 #656216]: How to set observe() to run in background forever?

2017-08-16 Thread Manfred Hampl
Question #656216 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/656216

Status: Open => Answered

Manfred Hampl proposed the following answer:
see
http://sikulix-2014.readthedocs.io/en/latest/region.html#Region.observeInBackground

"The observation is run in the background, meaning that the observation will be 
run in a subthread and processing of your script is continued immediately.
Take care, that your script continues with some time consuming stuff."

You need something what the script is doing in the foreground while the
observeinbackground is waiting for the image to appear. Otherwise the
script immediately continues, and terminates because there is nothing to
do.

Actions to keep the foreground "busy" are e.g. sleep(seconds) or
wait(,seconds) or a pop-up window as suggested by masuo, or otzher
actions like searching and/or clicking on images etc. etc.

If you do not have anything to do in foreground, but just want to wait
for the image to appear, you probably better use wait(img1,FOREVER)
instead of observerinbackground().

-- 
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 #656054]: 2 dimensional virtual slider

2017-08-16 Thread Manfred Hampl
Question #656054 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/656054

Status: Open => Answered

Manfred Hampl proposed the following answer:
Just some ideas:

(Please clarify: are there two independent crosshairs for vertical and
horizontal alignment or is it a single combined one?)

You will need an image of the marker alone, and an image of the crosshair alone.
search for both these images in the target region
compare the x values (of the image centers), and depending on sign of the 
difference press the left or right buttons

A problem will arise when the alignment is already very close, and the
marker and the crosshair will overlap!

similar with y values and up/down buttons. You might need an image with
the target marker and crosshair already overlapping in one dimension.

Finally you can check whether you find an image with target marker and
crosshair fully matching.

-- 
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 #656054]: 2 dimensional virtual slider

2017-08-16 Thread Manfred Hampl
Question #656054 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/656054

Status: Open => Needs information

Manfred Hampl requested more information:
How do the crosshair and the target marker really look like?
Is the crosshair always at the same screen position, or is that also variable?

You could use any free image hosting service on the web to upload sample
pictures and paste the links into this question document that we can see
the pics.

-- 
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 #656054]: 2 dimensional virtual slider

2017-08-16 Thread Manfred Hampl
Question #656054 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/656054

Status: Open => Needs information

Manfred Hampl requested more information:
Ok, the image helps to get a better understanding.
Just some thoughts:

The crosshair seems to be just a helping aid, you do not really need it,
because the aim is bringing the target market to a certain x- and
y-position (which is the center of the crosshair). And this position
seems to be fixed such that it can be calculated once and need not be
re-assessed based on an image of the crosshair.

Some additional factors to be taken into account:

To clarify: You have to click the buttons with the arrows to move the target, 
not the keyboard keys up / down / left / right ?
How much does the target marker move if you press the up / down / left / right 
buttons (in terms of fractions of the crosshair box)?
Is the amount of movement dependent on the duration of pressing these arrow 
buttons, or do long  and short button presses move the same amount?
Once you have brought the marker to the center vertically and then focus on 
horizontal alignment, will it stay centered vertically, or will the movement in 
the second direction disturb (a bit) the other direction, such that you have to 
go back to alignment of the other direction again?
Is there a limit how far off the center the final position is allowed, or has 
it to be 0 in any case?

-- 
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 #656054]: 2 dimensional virtual slider

2017-08-16 Thread Manfred Hampl
Question #656054 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/656054

Status: Open => Answered

Manfred Hampl proposed the following answer:
Developing such program without having access to the real system is almost 
impossible.
I am trying to outline the skeleton, but cannot provide a final solution.

You need:
a screenshot of the target marker ("marker,png")
the x-y-position of the center of the crosshair
the x-y-positions of the (center of the) up / down / right / left arrow 
buttons, eventually also the position of the button to switch from large to 
small movement.
the coordinates of the region with the crosshair.
the (average) amount of changing the x- respectively y-coordinates with one 
click on the arrow buttons in large and small movement

Now two proposals:

(eventually: switch to large step movement)
Search for the marker in the region of the crosshair
(if not found - abort processing)
calculate the difference in x coordinates between the center of the crosshair 
and the center of the marker position identified in the previous step
divide by the average distance of a large step
if positive:
 loop this many times to press the right button, (probably needing wait 
statements between)
else if negative:
 loop this many times to press the left button, (probably needing wait 
statements between)
(eventually: switch to small step and repeat from "search the marker" with 
small steps)

Do more or less the same in the y-direction



Or another possibility with permanent observation of the marker
movement:

Search for the marker in the region of the crosshair
(if not found - abort processing)
calculate the difference in x coordinates between the center of the crosshair 
and the center of the marker position identified in the previous step

switch to large step
loop until absolute value of difference between marker's x-position and center 
of crosshair is smaller than tolerance
 if difference >= average large step
  press left
 else if difference >= average small step
  switch to small step
  press left
 else if difference <= -(average small step)
  press right
 else if difference <= -(average small step)
  switch to small step
  press right
 search for marker again
 calculate the difference in x coordinates between the center of the crosshair 
and the center of the new marker position 

calculate the difference in y coordinates between the center of the crosshair 
and the center of the latest marker position 
switch to large step
do the loop as above for the alignment action in the other direction

Remark: the tolerance for the loop criterion should not be smaller than
about two thirds of a small movement. Otherwise the result might be an
oscillation between two positions slightly off the center.

Also here you might need to add wait statements after the button presses
to ensure that the alignment action has already been completed.

-- 
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 #656054]: 2 dimensional virtual slider

2017-08-17 Thread Manfred Hampl
Question #656054 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/656054

Status: Open => Answered

Manfred Hampl proposed the following answer:
Re: "However once the marker touches or overlaps the crosshair/s it will
not match the image of the marker stored initially... "

Searching for images in Sikuli has a similarity parameter.
The image on screen need not be 100% identical to the stored one.
It should be possible to set the similarity degree to a value that the marker 
is found even if it partly overlaps the crosshair.
This of course will need testing on the real system.

-- 
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 #656425]: Checking for a picture faster

2017-08-17 Thread Manfred Hampl
Question #656425 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/656425

Status: Needs information => Answered

Manfred Hampl proposed the following answer:
A general hint:
The smaller the region where you search for the image, the faster the search.

E.g. If you know that the green or red bar for the winner is always
shown on a specific position, then define a region around this position
endregion=Region(x,y,w,h) and do a endregion.exists(...) instead of
searching the whole screen with exists(...).

-- 
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 #656425]: Checking for a picture faster

2017-08-17 Thread Manfred Hampl
Question #656425 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/656425

Status: Open => Answered

Manfred Hampl proposed the following answer:
1. A statement like "This does not work." does not stimulate anybody to
help further. Can't you tell what happens if you try?

2. It seems that my wording was not clear enough, and you misunderstood my 
intentions.
Whenever you search for an image (including a click action which also does an 
search) , make the region where the search is executed as small as possible, 
and also make the image to search for as small as possible, but big enough that 
it is not inadvertently found elsewhere inside the search region.
This is relevant not only for the "endregion", but also for all other click 
(Set winner option...) actions.

The way that you did your region definition is counterproductive,
because you do it with another search inside the loop, and this will
probably even slow down the script.

My suggestion:
define the region where the green or red bar appears outside the while loop, 
and not by searching for an image but by giving coordinates - and as small as 
possible. 
If possible do the same for the region where "set winner option" will appear, 
and if possible also for the "yes" boxes.

I understood that the winner is announced by either a green or a red bar on a 
certain location on the screen.
I do not see the need to search for the complete red/green bar across the whole 
screen, maybe it is sufficient to check a small part of the area where that bar 
appears for red respectively green color.

-- 
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 #656425]: Checking for a picture faster

2017-08-18 Thread Manfred Hampl
Question #656425 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/656425

Manfred Hampl proposed the following answer:
I do not see the definition of endregion in your latest script.

I assume the following might work:

Settings.MoveMouseDelay(0.0)
endregion = Region (400, 30, 100, 50) # adapt the numbers to have a rectangle 
where the green or red bar will appear (the smallest reasonable one)
winnerregion=Region (500, 100, 100, 50) # adapt the numbers to have a rectangle 
where the "Set winner option" button will appear
yesregion=Region (600, 100, 100, 50) # adapt the numbers to have a rectangle 
where the "yes" button will appear

while True:
 setAutoWaitTimeout(0.1)
 player1 = endregion.exists("greenbar.jpg")
 player2 = endregion.exists("redbar.jpg")

 if player2:
  setAutoWaitTimeout(0.0)
  winnerregion.click(set winner option image 1)
  winnerregion.click(set winner option image 2)
  wait (6.0)
  if yesregion.exists(yes image)
click()
wait (5.0)
  continue
...

-- 
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 #656425]: Checking for a picture faster

2017-08-18 Thread Manfred Hampl
Question #656425 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/656425

Manfred Hampl proposed the following answer:
I do not have the program that you want to control, so I cannot really tell why 
your script is not doing what you expect.
You have to do some debugging yourself, and eventually do some further fine 
tuning.

Some ideas:
Check whether only player1 image is found or only player2 image or both

Maybe you have to increase the minimum similarity before the "playerX = 
endregion.exists(...)" statements by insering a
Settings.MinSimilarity = 0.8 #(or any other suitable value)
line.

-- 
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 #656425]: Checking for a picture faster

2017-08-20 Thread Manfred Hampl
Question #656425 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/656425

Status: Open => Answered

Manfred Hampl proposed the following answer:
Changing MinSimilarity will not help making processing of the script faster.
Key for speeding up the script is making the endregion and selectregion as 
small as possible.

-- 
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 #656940]: Conditional Check on click image Sikuli events

2017-08-25 Thread Manfred Hampl
Question #656940 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/656940

Status: Open => Needs information

Manfred Hampl requested more information:
If you execute the process manually, how do you know that "the event has 
completed generating 1000 records"?
You have to use this as the criterion to continue.

-- 
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 #656940]: Conditional Check on click image Sikuli events

2017-08-25 Thread Manfred Hampl
Question #656940 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/656940

Status: Open => Needs information

Manfred Hampl requested more information:
I do not know hoe to formulate my question that you understand my
intention:

Forget about Sikuli for a moment, but do this process manually.

If you press button 1 and start waiting for completion, how do you know that 
1000 records have been created?
Is there the number 1000 shown somewhere on the screen, or is there a message 
"generation complete", or something else?

How does a human person know that it is completed?

-- 
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 #656940]: Conditional Check on click image Sikuli events

2017-08-25 Thread Manfred Hampl
Question #656940 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/656940

Status: Open => Answered

Manfred Hampl proposed the following answer:
What is shown on the screen when the operation is completed?

Is it possible to make a screen shot of that and use in a exists()
operation?

-- 
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 #657024]: Sikuli IDE 1.1.0 is not working properly

2017-08-28 Thread Manfred Hampl
Question #657024 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/657024

Status: Open => Answered

Manfred Hampl proposed the following answer:
Try upgrading to version 1.1.1

-- 
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 #656940]: Conditional Check on click image Sikuli events

2017-08-28 Thread Manfred Hampl
Question #656940 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/656940

Status: Open => Answered

Manfred Hampl proposed the following answer:
Is there something constant that is shown with each execution, e.g. "records 
created"?
Then this could serve for creating a screen shot that can be searched.

-- 
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 #656940]: Conditional Check on click image Sikuli events

2017-08-28 Thread Manfred Hampl
Question #656940 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/656940

Status: Open => Needs information

Manfred Hampl requested more information:
You should create some kind of recipe how you would tell another person how to 
use that application.
"If you see this and that on screen, then do this and that, until there is a 
whatever on screen, or no whatever on screen any more."
This can then be translated into Sikuli steps.

How do these active and inactive buttons look like?
Can there be several active buttons on the screen at the same time?
What happens if you press an active button?
How do you know that the action of that button is complete?
...

-- 
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 #657192]: Key Attribute of Function key in keyboard

2017-08-31 Thread Manfred Hampl
Question #657192 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/657192

Status: Open => Answered

Manfred Hampl proposed the following answer:
Read the manual.

http://sikulix-2014.readthedocs.io/en/latest/keys.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


Re: [Sikuli-driver] [Question #657192]: Key Attribute of Function key in keyboard

2017-08-31 Thread Manfred Hampl
Question #657192 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/657192

Status: Open => Answered

Manfred Hampl proposed the following answer:
I assume that you are talking about a laptop that has two functions on
some of the F1...F12 keys (sound on/off, internal/external screen etc.
as well as the "normal" F1, F2, ... keys).

Usually that extra Fn key is handled in the computer's BIOS itself and
never interacts with a running application.

I assume that you just have to use key.F8 in sikuli to simulate sending
function key F8, and there is no way that sikuli simulates the "other"
function that is bound to that F8 key.

-- 
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 #657348]: Invalid change of AutoWaitTimeout

2017-09-04 Thread Manfred Hampl
Question #657348 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/657348

Manfred Hampl proposed the following answer:
Have you read the docs?

http://sikulix-2014.readthedocs.io/en/latest/region.html#Region.exists
recommends to set the time to zero if you just want to check whether an
image is there. Why are you using 0.5?

Generally find activities can be sped up by making the search region and/or the 
image smaller.
Maybe a search for the top left quarter of the image is enough to judge whether 
the picture is there or not, etc.

-- 
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 #657348]: Invalid change of AutoWaitTimeout

2017-09-04 Thread Manfred Hampl
Question #657348 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/657348

Manfred Hampl requested more information:
Can you identify a smaller part of the target image which is unique
enough that you can decide whether it is present on the screen based on
that smaller one?

-- 
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 #658022]: Reading content from pop up

2017-09-14 Thread Manfred Hampl
Question #658022 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658022

Status: Open => Needs information

Manfred Hampl requested more information:
Is the temp password only shown as an image on screen, or can you select
and copy the text?

-- 
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 #658022]: Reading content from pop up

2017-09-15 Thread Manfred Hampl
Question #658022 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658022

Manfred Hampl requested more information:
Can you try the following manually (not using sikuli):

Click on the password, press ctrl-a and press ctrl-v, open notepad (or any 
other simple editor program), press ctrl-v.
What do you there?

-- 
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 #658471]: "IOError: [Errno 13] Permission denied " - I see this error when trying to capture image using shutill

2017-09-21 Thread Manfred Hampl
Question #658471 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658471

Status: Open => Needs information

Manfred Hampl requested more information:
There are two possible reasons for the error:

Either you are missing write access to the C:\Sikuli\ManApp scripts\Imagelogs\ 
directory
or
the error is caused by illegal characters in the file name.

For testing purposes replace the second line of your script by

stime = time.strftime("%Y-%m-%d-%H-%M-%S")

What do you get?

-- 
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 #658596]: Lower pattern match within a loop on repeat

2017-09-25 Thread Manfred Hampl
Question #658596 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658596

Manfred Hampl proposed the following answer:
If I interpret your question correctly, then you are looking for
something like

print('1st loop')
mySimilarity = 1.0
while True:
if exists(Pattern("1505851538186.png").similar(mySimilarity)):
print('found 1st image at 1st loop with similarity %f') % mySimilarity
break
elif exists(Pattern("1521782392359.png").similar(mySimilarity)):
print('found 2nd image at 1st loop with similarity %f') % mySimilarity
break
else:
print('none of the images found at the 1st loop')
mySimilarity = mySimilarity - 0.05 # reduce by 5%
continue
hover(getLastMatch())

-- 
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 #658613]: issues when using Python logging module in sikuli

2017-09-26 Thread Manfred Hampl
Question #658613 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658613

Manfred Hampl proposed the following answer:
I assume that your usage of the logging module is not correct.

As far as I know logger.addHandler() needs a handler as its parameter,
and not a file name.

Maybe you can use https://docs.python.org/2.3/lib/node304.html as a
template.

-- 
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 #658728]: How to work around an occasional image

2017-09-29 Thread Manfred Hampl
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728

Status: Open => Answered

Manfred Hampl proposed the following answer:
Maybe the following approach works:

Split the logic into two parts:
1. the main logic, as already programmed by you

wait("image1", FOREVER)
click("image1")
wait("image2", FOREVER)
click("image2")

and
2. additional logic that runs when that image1.5 shows up
For this you can let an observer run in the background.

def myHandler(e):
print "image 1.5 appeared"
onAppear("image1.5.png", myHandler)
observe(FOREVER, background = True)

(part 2 has to go before part 1)

-- 
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 #658728]: How to work around an occasional image

2017-10-01 Thread Manfred Hampl
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728

Status: Open => Answered

Manfred Hampl proposed the following answer:
You modified ndinev's suggestion in a wrong way.
You just have to take it as it is and insert the image names, and this should 
work.

Work on this line:
ImagesA_Z=["imageA.png", "imageB.png","imageC.png", "imageD.png",  ... and so 
on until ... "imageZ.png"]

-- 
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 #658728]: How to work around an occasional image

2017-10-01 Thread Manfred Hampl
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728

Status: Open => Answered

Manfred Hampl proposed the following answer:
If your primary logic is more complicated that just [:wait - click:], then I 
would like to go back to my recommendation with an observer.
It seems that there was an error in my first proposal; apparently there is old 
code in an example of the documentation in 
http://sikulix-2014.readthedocs.io/en/latest/scripting.html?highlight=observer#Settings.ObserveScanRate

Try with something like

def myHandler(e):
 click("image1.5.png")
onAppear("image1.5.png", myHandler)
observeInBackground(FOREVER)

wait("Image_A.png", FOREVER)
click("Image_A.png")
wait("Image_B.png", FOREVER)
click("Image_B.png")
wait("Image_C.png", FOREVER)
click("Image_C.png")
wait("Image_D.png", FOREVER)
click("Image_D.png")
wait("Image_E.png", FOREVER)
click("Image_E.png")
type("username")
click(in the password field)
type("password")
wait("Image_F.png", FOREVER)
click("Image_F.png")

etc.



Maybe the following approach works:

Split the logic into two parts:
 1. the main logic, as already programmed by you

wait("image1", FOREVER)
 click("image1")
 wait("image2", FOREVER)
 click("image2")

and
 2. additional logic that runs when that image1.5 shows up
 For this you can let an observer run in the background.


(part 2 has to go before part 1)

-- 
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 #649155]: Set Password

2017-10-22 Thread Manfred Hampl
Question #649155 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/649155

Status: Open => Needs information

Manfred Hampl requested more information:
I do not really understand your question.
To which system do you want to log in? Doesn't that system already have its 
login screen?

-- 
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 #649155]: Set Password

2017-10-24 Thread Manfred Hampl
Question #649155 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/649155

Status: Open => Answered

Manfred Hampl proposed the following answer:
Sorry, but I am not able to offer a user identification and
authentication management system in sikuli.

I already made a proposal in comment #1 for a simple validation check.
If that is not enough, then you have to ask somebody else.

-- 
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 #660366]: How to continously run a piece of code while simultaneously checking for a condition?

2017-11-05 Thread Manfred Hampl
Question #660366 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660366

Status: Open => Answered

Manfred Hampl proposed the following answer:
I think that http://sikulix-2014.readthedocs.io/en/latest/region.html
#observing-visual-events-in-a-region is the function you are looking
for.

-- 
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 #660578]: Unable to type email adresse with special caracter (@) - French Keyboard

2017-11-13 Thread Manfred Hampl
Question #660578 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660578

Status: Open => Answered

Manfred Hampl proposed the following answer:
Try

keyDown (KEY.ALT)
type (Key.NUM0)
type (Key.NUM6)
type (Key.NUM4)
keyUp (KEY.ALT)

-- 
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 #660787]: How to download a file without a browser using Sikuli

2017-11-15 Thread Manfred Hampl
Question #660787 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660787

Status: Open => Answered

Manfred Hampl proposed the following answer:
There are tools for doing this, e.g. wget available at
http://www.gnu.org/software/wget/

-- 
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 #660880]: Sikuli popup timeout

2017-11-18 Thread Manfred Hampl
Question #660880 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660880

Status: Open => Answered

Manfred Hampl proposed the following answer:
I assume the example is wrong.

The parameters for popup are message, title, preset, hidden, timeout,
location.

Try
result = popup("autoclosed after 3 seconds"3)
...

-- 
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 #661057]: Hi I am getting the below error when sikulix is used in eclipse

2017-11-25 Thread Manfred Hampl
Question #661057 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/661057

Status: Open => Needs information

Manfred Hampl requested more information:
Have you tried providing the full path to the image file in the
s.click() statement?

-- 
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 #661057]: Hi I am getting the below error when sikulix is used in eclipse

2017-11-25 Thread Manfred Hampl
Question #661057 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/661057

Status: Open => Needs information

Manfred Hampl requested more information:
Does this path really exist?
"Sikul" instead of "Sikuli"?
Have you tried backslashes instead of forward slashes (eventually even double 
backslashes)?

Can you please provide the error message that you receive, e.g.
[error] Image: could not be loaded: 
file:/C:/Users/xw66/workspace/Sikul/Capture.PNG
and verify whether such file really exists

-- 
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 #661057]: Hi I am getting the below error when sikulix is used in eclipse

2017-11-26 Thread Manfred Hampl
Question #661057 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/661057

Status: Open => Answered

Manfred Hampl proposed the following answer:
If you look closely enough, you will see that the error message now is
different:

Earlier it was "... Image: could not be loaded ..." i.e. the program could not 
load the image.
Now it is "...  FindFailed: Capture.PNG ..." i.e. the program was able to load 
the image for comparison (apparently the slashes or backslashes were now 
correct), but it did not find a similar image on the screen.

-- 
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 #661057]: Hi I am getting the below error when sikulix is used in eclipse

2017-11-26 Thread Manfred Hampl
Question #661057 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/661057

Status: Open => Answered

Manfred Hampl proposed the following answer:
There is nothing to resolve.

You have a "capture.png" image, and try to find whether a similar image is 
shown on the screen and click on it.
With a plain "*.click()" instruction you will receive the error message 
"FindFailed", if such image is not shown on the screen. This is expected 
behavior.

Some more details are available in the documentation, e.g.
http://sikulix-2014.readthedocs.io/en/latest/region.html

What do you want to achieve?
You should always take into account the possibility, that the image (button 
etc.) which you want to click is not shown on screen.

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


  1   2   3   >