Forum Discussion
ruarig
13 years agoNew Contributor
I found a solution to this:
I was able to find the button item by going through the toolbarsmanager.toolbar.tools.Item_2(Item) properties.
On setting that as an object in my script I got the X and Y bounds of the button object and used those to identify where to click for the button.
N.B. to click the middle of the button and ensure the click is on the button I added bounds width to the X position and bounds height to the Y position, then divided them both by 2.
I was able to find the button item by going through the toolbarsmanager.toolbar.tools.Item_2(Item) properties.
On setting that as an object in my script I got the X and Y bounds of the button object and used those to identify where to click for the button.
N.B. to click the middle of the button and ensure the click is on the button I added bounds width to the X position and bounds height to the Y position, then divided them both by 2.
var x = button.Bounds.X + button.Bounds.Width / 2;
var y = button.Bounds.Y + button.Bounds.Height / 2;
Related Content
- 6 years ago
- 4 years ago
Recent Discussions
Working with Visual Test
Solved2 days agoBypassing TC engine
Solved2 days ago