Jump to content
Sign in to follow this  
Sravanth

Clicking on a control which changes its control id

Recommended Posts

In deep freeze the controlid's are changing for all the controls present in it. So how shall i click on a particular control without using control id's.

mouseclick fn cant help if the resolution is changed, so cant even use it. so how can i use controlclick in the above mentioned case.

Share this post


Link to post
Share on other sites

Another thing you can do is use relative positions. Basically before you do a mouse click find out how big the window is and where it is at. Than click based on a percentage of that value (or hard coded if you know specific values for the width or height).

Cheers

$windowdimension = WinGetPos()
$winxposition = $windowdimension[0]
$winyposition = $windowdimension[1]
$winwidth = $windowdimension[2]
$winheight = $windowdimension[3]

MouseClick("left",$winxposition + .774 * $winwidth, $winyposition + .555 * $winheight)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...