Hi,
Im looking for random click(XClick) within selected area.
For example as a Command I choose: XClick and as a Target I select some button on website.
Everytime i run this script program click the button in his center.
How to do some random offset to make every new click in different position within this button area? Is it possible?
This is above script:
"Commands": [
{
"Command": "open",
"Target": "http://google.com",
"Value": ""
},
{
"Command": "XClick",
"Target": "vncpcj_dpi_96.png",
"Value": ""
}
]
}
cr1s
November 24, 2021, 8:29am
4
Hey!Please can you write down the code? I tried to write in these but unfortunetly didint worked
ulrich
November 24, 2021, 9:30pm
5
@cr1s Can you post your sample code? What is not working?
1 Like
Didnt worked for me too
“Cannot convert undefined or null to object”
The full code
{
“Name”: “googlerandom”,
“CreationDate”: “2023-1-9”,
“Commands”: [
{
“Command”: “selectWindow”,
“Target”: “title=Google”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “visualAssert”,
“Target”: “vncpcj_dpi_96.png”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “return ${!imagex} + Math.floor((0.5-Math.random())*40)”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “return ${!imagey} + Math.floor((0.5-Math.random())*20)”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “XClick”,
“Target”: “x1,y1”,
“Value”: “”,
“Description”: “”
}
]
}