Re: [Sikuli-driver] [Question #690371]: Drag and Drop random region

2020-07-20 Thread GHDSPORTS
Question #690371 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/690371

GHDSPORTS posted a new comment:
The ondrop event occurs when a draggable element or text selection is
dropped on a valid drop target. Drag and drop is a very common feature
in HTML5 https://ghd-sports.com/

-- 
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 #690371]: Drag and Drop random region

2020-07-20 Thread GHDSPORTS
Question #690371 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/690371

GHDSPORTS posted a new comment:
https://ghd-sports.com/

-- 
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 #690371]: Drag and Drop random region

2020-05-02 Thread xyz_User
Question #690371 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/690371

Status: Answered => Solved

xyz_User confirmed that the question is solved:
Thanks very much Manfred!

-- 
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 #690371]: Drag and Drop random region

2020-05-02 Thread xyz_User
Question #690371 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/690371

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 #690371]: Drag and Drop random region

2020-05-02 Thread Manfred Hampl
Question #690371 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/690371

Status: Open => Answered

Manfred Hampl proposed the following answer:
Just a small modification, I had expected that you can do the required changes 
yourself.
Probably something like

import random
random.seed()

myRegion = ... # define your region by whatever means, e.g. by
specifying the coordinates, or as a match for a find action, ...

myX = myRegion.getX()
myY = myRegion.getY()
myW = myRegion.getW()
myH = myRegion.getH()

dragDrop(Location(random.randint(myX,myX+myW),random.randint(myY,myY+myH)),
Location(random.randint(myX,myX+myW),random.randint(myY,myY+myH)))

-- 
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 #690371]: Drag and Drop random region

2020-05-02 Thread xyz_User
Question #690371 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/690371

Status: Answered => Open

xyz_User is still having a problem:
Thank you Manfred, I'd like to specify about 80% of the screen (or a
region) and not the entire full screen. If that makes sense

-- 
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 #690371]: Drag and Drop random region

2020-05-01 Thread Manfred Hampl
Question #690371 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/690371

Status: Open => Answered

Manfred Hampl proposed the following answer:
Probably something like

import random
random.seed()

mywidth = Screen(0).getW()
myheight = Screen(0).getH()

dragDrop(Location(random.randint(0,mywidth),random.randint(0,myheight)),Location(random.randint(0,mywidth),random.randint(0,myheight)))

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


[Sikuli-driver] [Question #690371]: Drag and Drop random region

2020-05-01 Thread xyz_User
New question #690371 on Sikuli:
https://answers.launchpad.net/sikuli/+question/690371

Would appreciate if someone can show me how drag and drop would work via random 
screen regions. 

I  have it specify manual coords to do it - And it works, but how can I make so 
it's completely random and not dependent on manual coords that I provide, this 
is what I have:


def randomDrag1():
dragDrop(Location(214, 771),Location(1464, 151))
def randomDrag2(): 
dragDrop(Location(1457,148),Location(308,798))  
def randomDrag3():  
dragDrop(Location(217,236),Location(1543,823))


def randomChoice():
all3Locations = [randomDrag1, randomDrag2, randomDrag3]
random.choice(all3Locations)()

randomChoice()

Thank you!



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