Sign in to follow this  
Followers 0
creeping

Controls ID's changes each time program starts

5 posts in this topic

I wish to automate Dial-a-fix, each time I run the program the controls ID's change. Makes it rather hard to click stuff etc. I have not seen ID's change before. What are the reasons for this? Any work arounds that are not to complex?

Thanks.

Share this post


Link to post
Share on other sites



And why don't you work with the classnameNN value?

Share this post


Link to post
Share on other sites

And why don't you work with the classnameNN value?

Ok, I could do that. As for my first question... I would just rather work with ID's rather than classname stuff if possible.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Why not just work with handles then?

$hctlXYZ = ControlGetHandle($window,$text,"ClasnameNN")

Or put in a routine to get the controlIDs and stuff it in a variable each time you detect a restart of said program?

Or ... do what I do, match text on a control that doesn't change and use that in a detection loop to get the ClassnameNN.

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

I would just rather work with ID's rather than classname stuff if possible.

Why? You just said it's changing on each start up, what's the difference if it works?

If you want to take the long way around it then...

_CtrlGetByPos


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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  
Followers 0