sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #03239
[Bug 795498] Re: Make Region.click() arguments optional
But this means some exception to the general API concept, which means with a Region.click(PSMRL) to restrict the find operation with PS to the given Region.
When using click(MRL) it is not necessary to specify a Region, since the argument denotes an absolute click point.
so the above example could be written:
for f in findAll(findobjs):
area = Region(f.nearby(100))
click(area)
So with your approach you have to write an additional dot ;-)
And this does not have any impact on performance.
But if it is accepted by the developers, I would like to generalize this
request:
a click() (no arguments given) should click:
Match.click() --- the defined target clickpoint
Region.click() --- the center
click() --- center of SCREEN
Location.click() --- the given point
same goes for rightClick(), doubleClick().
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/795498
Title:
Make Region.click() arguments optional
Status in Sikuli:
New
Bug description:
Region.click() should click at its center. It will make code more
clean (and perhaps faster), e.g. from:
for f in findAll(findobjs):
area = Region(f.nearby(100))
f.click(area)
to:
for f in findAll(findobjs):
area = Region(f.nearby(100))
area.click()
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/795498/+subscriptions
References