"click" and "mousemove" work incorrectly

Asked by Chp

my code:
t1 = None
t2 = exists("1434631000840.png")
print t1
print t2
for i in range(3):
    print ('-----------------------t1------------------')
    mouseMove(t1)
    sleep(1)
    click(t1)
    print ('-----------------------t1------------------')
    print ('-----------------------t2------------------')
    mouseMove(t2)
    sleep(1)
    click(t2)
    print ('-----------------------t2------------------')
    print ('-----------------Move mouse----------------')
    mouseMove(Location(1000,700))
    print ('-----------------Move mouse----------------')

log sikuli:
None
M[1195,284 122x124]@S(S(0)[0,0 1920x1080]) S:1,00 C:1256,346 [324/324 msec]
-----------------------t1------------------

[log] CLICK on L(932,529)@S(0)[0,0 1920x1080]

-----------------------t1------------------
-----------------------t2------------------

[log] CLICK on L(1256,346)@S(0)[0,0 1920x1080]

-----------------------t2------------------
-----------------Move mouse----------------

-----------------Move mouse----------------
-----------------------t1------------------

[log] CLICK on L(1000,700)@S(0)[0,0 1920x1080]

-----------------------t1------------------
-----------------------t2------------------

[log] CLICK on L(1256,346)@S(0)[0,0 1920x1080]

-----------------------t2------------------
-----------------Move mouse----------------

-----------------Move mouse----------------
-----------------------t1------------------

[log] CLICK on L(1000,700)@S(0)[0,0 1920x1080]

-----------------------t1------------------
-----------------------t2------------------

[log] CLICK on L(1256,346)@S(0)[0,0 1920x1080]

-----------------------t2------------------
-----------------Move mouse----------------

-----------------Move mouse----------------
From where sikuli took location for clicks? :
[log] CLICK on L(932,529)@S(0)[0,0 1920x1080]
[log] CLICK on L(1000,700)@S(0)[0,0 1920x1080]

It seems that somehow sikuli remembers location from mousemove

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#2

apparently click(None) clicks at the current mouse location.

not really by intention, but good to know ;-)

Revision history for this message
Chp (chpnick) said :
#3

This is bug?

Revision history for this message
Best RaiMan (raimund-hocke) said :
#4

not really.
None as parameter is not defined and hence the result not predictable.
It is your responsibility to not use None as parameter.

Revision history for this message
Chp (chpnick) said :
#5

Thanks RaiMan, that solved my question.