Pass Location() as a parameter in definition
I created the following definition to calculate new click location when a windowed application is moved around.
app = App("someapp")
def clickloc(X, Y):
app.focus()
appregion = Region(
appregionx = appregion.getX()
appregiony = appregion.getY()
click(
clickloc(1194, 109)
I would like to just use clickloc(
How would I go about that? Wasn't sure how to pass location object as a parameter.
Also, is there a better method than doing app.focus() then the Region(
Tried the following but gave wrong coords.
appregion = App("someapp"
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Sikuli Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- 2020-08-21
- Last query:
- 2020-08-21
- Last reply:
- 2020-08-21
|
#1 |
def clickloc(
app.focus()
appregion = Region(
appregionx = appregion.getX()
appregiony = appregion.getY()
click(
clickloc(
nuknuk (nuknuk88) said : | #2 |
Thanks RaiMan!
nuknuk (nuknuk88) said : | #3 |
Thanks RaiMan, that solved my question.