Jump to content
Sign in to follow this  
lindsten

Get all controls of a window

Recommended Posts

lindsten

Hi!

Is it possible to get all the controls of a window into an array?

What I need is a function

$arr = WinGetAllControls("MyProg")

that will produce

$arr[3] = "[CLASS:TextBox; INSTANCE:2]"

Is there a way to do this?

/ Mikael

Share this post


Link to post
Share on other sites
jokke

From some windows you wont be able to "catch" its controlls.

For instance such as games you wont be able to "find" any controlls.

But to answer your question, look into the "Window Info" tool that comes with AutoIt, its source is inn the AutoIt folder somewhere.


UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt.

Share this post


Link to post
Share on other sites
lindsten

... its source is inn the AutoIt folder somewhere.

I can't seem to find it, neither in the AutoIt folder or any subfolder below =/

Share this post


Link to post
Share on other sites
lindsten

I just found the WinGetClassList function. It returns the class names but no instance numbers.

Are the instance numbers always consecutive starting with 1? In that case, I can do with this function!

Share this post


Link to post
Share on other sites
martin

I just found the WinGetClassList function. It returns the class names but no instance numbers.

Are the instance numbers always consecutive starting with 1? In that case, I can do with this function!

The control tab will show you the class name and the instance.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
lindsten

The control tab will show you the class name and the instance.

The thing is that I need to get them in my script, not manually using the Window Info tool...

/ Mikael

Share this post


Link to post
Share on other sites
lindsten

I can't seem to find it, neither in the AutoIt folder or any subfolder below =/

I could need the source for the Window Info tool or the AU3Record tool. Could someone point me in the right direction?

/ Mikael

Edited by lindsten

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.