Sign in to follow this  
Followers 0
sandyd

Enumerating Controls ...

6 posts in this topic

#1 ·  Posted (edited)

Hi Peeps,

I've tried searching for but can't find anything useful.

What commands should I be looking at to enumerate all the controls on a child window.

I would like to be able to save their info (x,y,width,height,styles etc) to a text file, then be able to load them from that file at a later date.

Any help appreciated

Edited by sandyd

----[ SandyD ]---

Share this post


Link to post
Share on other sites



ControlGetPos

unless i misunderstood


[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

That helps a bit, but I still need to be able to specify the window and get back a list of ALL controls on it, preferably with all their properties.

Thanks for the info though

Edited by sandyd

----[ SandyD ]---

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

You might want to loop and go through all the controls on a gui until you have an error for example:

Dim $n
AutoItWinSetTitle ( "la huskalamoo" )
WinShow ( "la huskalamoo", '', @SW_SHOW )
While 1
   $n = $n + 1
   If ControlGetHandle ( "la huskalamoo", "", $n ) = "" Then ExitLoop
WEnd
MsgBox ( 0, 'Control Count', 'There are ' & $n & ' controls.' )

edit: this doesn't work im trying to make it work another way right now

Edited by Xenogis

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Share this post


Link to post
Share on other sites

Back again ...

I have used

$ControlList = StringSplit(WinGetClassList("Form",""),@LF)

to get a list of the controls on a form, but it only returns button,button etc. Any way to get it to come back with the button name? e.g. Button1, Button2 etc?


----[ SandyD ]---

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