Jump to content

Recommended Posts

Posted

I have a window which is a listbox with some texts on that, when i try to identify the text using the "AutoIT window info" tool, the text is showing as " " eventhough there are more than 10 options. Can you please let me know what can be done?

I have attached the file for ref.

post-65245-0-96837700-1312825579_thumb.j

Posted (edited)

I have a window which is a listbox with some texts on that, when i try to identify the text using the "AutoIT window info" tool, the text is showing as " " eventhough there are more than 10 options. Can you please let me know what can be done?

I have attached the file for ref.

I have tested this with four old apps with a Delphi TListBox class control (Reshacker etc.),

however, YMMV...

Check that the TITLE and CLASS text are correct, or preferably,

copy the window/control text from the au3info tool to the clipboard by double clicking the title/class/advanced mode text.

Run this with the Report Access Definitions window open.

You'll need to be running SciTE for the consolewrites.

Good Luck

#Include <GuiListBox.au3>

Global $sWin = "[TITLE:Report Access Definitions; CLASS:TfrmRad]"
Global $sCtrl = "[CLASS:TListBox; INSTANCE:1]"

Global $sTxtBuf, $sTxt

Global $hParent = WinGetHandle($sWin)
ConsoleWrite('+$hParent = ' & $hParent & @CRLF)
If IsHWnd($hParent) = 0 Then Exit MsgBox(4096, "TfrmRad", "Error: Window handle not returned")

Global $hTListBox = ControlGetHandle($hParent, "", $sCtrl)
ConsoleWrite('+$hTListBox = ' & $hTListBox & @CRLF)
If IsHWnd($hParent) = 0 Then Exit MsgBox(4096, "TListBox", "Error: Control handle not returned")

For $i = 0 To _GUICtrlListBox_GetCount($hTListBox) -1
    $sTxt = "Index[" & $i & "] Text: " & _GUICtrlListBox_GetText($hTListBox, $i)
    $sTxtBuf &= $sTxt & @CRLF
    ConsoleWrite('-' & $sTxt & @CRLF)
Next

MsgBox(4096, "Report Access Definitions", $sTxtBuf)
Edited by rover

I see fascists...

  • 4 weeks later...

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...