Jump to content
Sign in to follow this  
momitty

Get ControlID during script execution

Recommended Posts

Is there a way to get the ControlID without using the AutoIt Info window...like when the script is running? I'm using some software that generates these boxes on the screen based on some databases. I have AutoIt creating the boxes for me now, but it doesn't know what the controlId is and that changes everytime they are made.

I can get a class list, but not a control id based on any of those names.

Thanks!

Share this post


Link to post
Share on other sites

Is there a way to get the ControlID without using the AutoIt Info window...like when the script is running?  I'm using some software that generates these boxes on the screen based on some databases.  I have AutoIt creating the boxes for me now, but it doesn't know what the controlId is and that changes everytime they are made. 

I can get a class list, but not a control id based on any of those names.

Thanks!

<{POST_SNAPBACK}>

can you post an example of what you are experiencing?

Thanks :(

Share this post


Link to post
Share on other sites

I was looking at WinList() look in the helpfile. I am not sure it would return the values you are wanting but it might.

Also some more examples as JPM said, would be useful as well.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

OK, I am making an unattended installation for WinVNC 3.3.5 and the installer changes the ControlIDs everytime it runs so I use, instead, the ClassNameNN. For example: the "Next" Button has the ControlID 151436 and if I cancel the Installer and run it again the ControlID is something like 364698, but the ClassNameNN is always "TButton2". So I use:

ControlClick("Setup - VNC","Welcome","TButton2","Primary")

This only happens on installation options pages, the first MsgBox wich asks whether or not one wants to install the application has always the same ControlIDs.

I hope this helps someone out. It took me a while to figure this out cause I didn't want to use plain Send() commands.

You can also use the text of the control (&Next) and the ControlHandle.

More info in the "Function Reference / Window Management / Controls" section of the AutoIt helpfile.

I only have one question: Maximum "normal" ControlID is limited to 65535. ¿Am I right? TIA.


AutoIt is a blessing, I don't know how I was able to use my computer before [Auto]It :-S

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...