Re: [Sikuli-driver] [Question #685815]: Drag drop to random (pre-defined) location

2019-11-13 Thread TestMechanic
Question #685815 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/685815

TestMechanic posted a new comment:
Thanks Manfred for solving the problem...

-- 
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 #685815]: Drag drop to random (pre-defined) location

2019-11-13 Thread xyz_User
Question #685815 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/685815

Status: Answered => Solved

xyz_User confirmed that the question is solved:
Thanks Manfred Hampl, that solved my question.

-- 
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 #685815]: Drag drop to random (pre-defined) location

2019-11-13 Thread xyz_User
Question #685815 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/685815

xyz_User posted a new comment:
Thanks guys - Got me to think and I solved it by storing the location
objects in a list then using randint method from random to call the
list.

Thanks again!

-- 
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 #685815]: Drag drop to random (pre-defined) location

2019-11-13 Thread TestMechanic
Question #685815 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/685815

TestMechanic proposed the following answer:
You need to fix script like that ( I test it with hover but you can run
it with your drag-drop)

import random
from random import choice

def position1():
return Location(548,292)

def position2():
return Location(633,293)

def position3():
return Location(738,288)

def position4():
return Location(817,284)

def randomDrop():
positionOneToFour = [position1(), position2(), position3(), position4()]
return random.choice(positionOneToFour)

def main():
dragDrop("1573618403777.png",randomDrop())
print('done')

main()

-- 
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 #685815]: Drag drop to random (pre-defined) location

2019-11-13 Thread TestMechanic
Question #685815 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/685815

TestMechanic proposed the following answer:
You are calling method incorrectly - you need 
1. use () in functions call
2. use return

I example that i gave you i added ()
hover(randomDrop())

so you need to type randomDrop() instead of randomDrop in your dragDrop
call

-- 
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 #685815]: Drag drop to random (pre-defined) location

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

Status: Open => Answered

Manfred Hampl proposed the following answer:
Have you tried

dragDrop("1573618403777.png",randomDrop()).

(note the position of the left parenthesis)

-- 
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 #685815]: Drag drop to random (pre-defined) location

2019-11-13 Thread xyz_User
Question #685815 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/685815

Status: Answered => Open

xyz_User is still having a problem:
Hi thanks for the response, but that doesn't do anything. As you can see
I know to drag an image to a random location based on the 4 coordinates.

Youre code just had hover(randomDrop()) with out any indication of images. 
I've also tried your code with  dragDrop("1573618403777.png",(randomDrop)). 

Same result as my original post

-- 
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 #685815]: Drag drop to random (pre-defined) location

2019-11-13 Thread TestMechanic
Question #685815 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/685815

Status: Open => Answered

TestMechanic proposed the following answer:
You need to fix script like that ( I test it with hover but you can run
it with your drag-drop)

import random
from random import choice

def position1():
return Location(548,292)

def position2():
return Location(633,293)

def position3():
return Location(738,288)

def position4():
return Location(817,284)

def randomDrop():
positionOneToFour = [position1(), position2(), position3(), position4()]
return random.choice(positionOneToFour)


def main():
hover(randomDrop())
print('done')

main()

-- 
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 #685815]: Drag drop to random (pre-defined) location

2019-11-13 Thread xyz_User
Question #685815 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/685815

xyz_User posted a new comment:
@RainMan would really appreciate if you can provide some guidance :)
Thanks

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #685815]: Drag drop to random (pre-defined) location

2019-11-12 Thread xyz_User
Question #685815 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/685815

Summary changed to:
Drag drop to random (pre-defined) location

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