Jump to content
Sign in to follow this  
frozensmilz

Need help in script that displays whether the gui component is button or text box ?

Recommended Posts

frozensmilz

Hello friends,

I am using the below function to display the gui components available in a form

WinGetClassList()

But i have noticed that this function is only displaying text box (Edit), buttons & combo boxes etc. but not labels. Because of this i am not able to create a script that can determine which text box or any other gui component is relevant(without label how we will know what data is handled by text box).

1. Is there is any way to solve this issue...

2. Is there way to display the text (incase of buttons & textbox) after getting the class

eg:

1. suppose the class is Edit which is a text box containing some default value say "abc". Using Edit how can i find what text it is having

2. suppose a window whose class is GuiMenuClass having window title SAMPLE. using GuiMenuClass how can i find what title it is having

3. suppose if a component is a combo box or list box. is it possible to get the value it holds.

Control id is not an option since the antivirus scrambles the id making it random

the below script is an attempt to display the gui component classes from an active window

WinActivate("Mark")

$hWnd = WinGetHandle("Mark")

If @error Then Exit MsgBox(16, "Error", "No window matches the criteria")

$class=WinGetClassList($hWnd)

$class=StringSplit($class,@CRLF)

FOR $INDEX = 1 TO UBound($list,1)-1

MsgBox(0, "BAS", $class[$INDEX])

Next

Kindly help me. thanks.

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  

×