Jump to content

Text on the labels designed in vb is not identified


Recommended Posts

In our application is developed in vb.

Labels (which are identified as image ThunderRT6Frame by autoit) are not identified in the application.

Do any one have idea about how to identify the text in the label.

Thanks

Link to comment
Share on other sites

In our application is developed in vb.

Labels (which are identified as image ThunderRT6Frame by autoit) are not identified in the application.

Do any one have idea about how to identify the text in the label.

Thanks

Show a screenshot and the output of AutoIt Window Info (AU3Info.exe). Frames don't have text themselves (I don't think), but contain other controls. So you should be able to see a ThunderRT6TextBox, for instance, inside the frame that has the actual text in it. That's the control you want to read.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

You last post had two copies of the same screenshot. That helps a little, but we really need to see a screen shot of AutoIt Window Info, with the control tab of the info tool selected, and the mouse over each of those boxes. That would really help.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

You last post had two copies of the same screenshot. That helps a little, but we really need to see a screen shot of AutoIt Window Info, with the control tab of the info tool selected, and the mouse over each of those boxes. That would really help.

:)

We are using the AutoIt Window Info for the control information. Even it is not identifying the Label Control.

Please find the attachment

post-25727-1186485693_thumb.jpg

Link to comment
Share on other sites

  • Moderators

We are using the AutoIt Window Info for the control information. Even it is not identifying the Label Control.

Please find the attachment

The text shows me you're only getting the Group control there.

Try using _WinGetCtrlInfo() and or _CtrlGetByPos and see what you get.

http://www.autoitscript.com/forum/index.ph...c=32781&hl=

http://www.autoitscript.com/forum/index.ph...c=30717&hl=

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

The text shows me you're only getting the Group control there.

Try using _WinGetCtrlInfo() and or _CtrlGetByPos and see what you get.

http://www.autoitscript.com/forum/index.ph...c=32781&hl=

http://www.autoitscript.com/forum/index.ph...c=30717&hl=

Thanks for sending the url.

using the _WinGetCtrlInfo() function we are able to retrieve all the controls info which are hidden or unhidden in the same window. & _CtrlGetByPos gives the control by its position.

But in our application the control is not identified & i need to get the text on the control in the window which is not identified by the AutoIt Window Info .

Link to comment
Share on other sites

Thanks for sending the url.

using the _WinGetCtrlInfo() function we are able to retrieve all the controls info which are hidden or unhidden in the same window. & _CtrlGetByPos gives the control by its position.

But in our application the control is not identified & i need to get the text on the control in the window which is not identified by the AutoIt Window Info .

I have scripted on GUIs with ThunderRT6 controls, and there was no trick to it. The controls you are targeting may not be generated directly by VB or Windows APIs. They may be graphical elements created by calling something else (i.e. ColdFusion, Flash).

If this is an in-house app, tell us what the snippet of code is that generates the control inside the frame you are trying to work with. That will tell us how, or if, you can access the text value.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

I have scripted on GUIs with ThunderRT6 controls, and there was no trick to it. The controls you are targeting may not be generated directly by VB or Windows APIs. They may be graphical elements created by calling something else (i.e. ColdFusion, Flash).

If this is an in-house app, tell us what the snippet of code is that generates the control inside the frame you are trying to work with. That will tell us how, or if, you can access the text value.

:)

The following is the code used in VB. We need to get the caption of the Label using the AutoIt tool

Private Sub Command1_Click()

Label1.Caption = "Hello"

End Sub

Link to comment
Share on other sites

The following is the code used in VB. We need to get the caption of the Label using the AutoIt tool

Private Sub Command1_Click()

Label1.Caption = "Hello"

End Sub

That looks like Label1 is an existing object representing the control and .Caption is a property you are setting. More interesting would be the code where Label1 itself is created. Again, if it's just a Label control there is no trick to it. What we want to know is if Label1 was created by calling some graphical app.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

That looks like Label1 is an existing object representing the control and .Caption is a property you are setting. More interesting would be the code where Label1 itself is created. Again, if it's just a Label control there is no trick to it. What we want to know is if Label1 was created by calling some graphical app.

:)

In VB we have just added the two controls.

Label

Button

When Button is being clicked the Label caption is changed. We need to retrieve the caption of the Label at runtime.

Can we the Label Caption by converting it to any other object using autoit or is there any other method

Link to comment
Share on other sites

In VB we have just added the two controls.

Label

Button

When Button is being clicked the Label caption is changed. We need to retrieve the caption of the Label at runtime.

Can we the Label Caption by converting it to any other object using autoit or is there any other method

You still haven't shown how Label1 was created.

Smarter people may know already, but I can't tell without something to test on. Can you post a short VB script that creates a similar window? If it's really a simple VB control, then there should be no need for any additional software except the VB code snippet to draw the example. That would give us something to test against. If it requires full VB and can't be duplicated in VBScript, then you could post a compiled .exe that only presents that one window for demo.

For me, at least, if I can't duplicate the symptoms I won't be able to help.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

You still haven't shown how Label1 was created.

Smarter people may know already, but I can't tell without something to test on. Can you post a short VB script that creates a similar window? If it's really a simple VB control, then there should be no need for any additional software except the VB code snippet to draw the example. That would give us something to test against. If it requires full VB and can't be duplicated in VBScript, then you could post a compiled .exe that only presents that one window for demo.

For me, at least, if I can't duplicate the symptoms I won't be able to help.

:)

The application we are using is developed in onsite (It is developed in the earlier 1990) and we are testing it in offshore and we are not familiar with the code which is used for the Label.

We are thinking that the control we are testing is a Label control.

Ours is a banking application where the calculated values of the loan are displayed in the form or label captions.

Edited by mmahima
Link to comment
Share on other sites

The application we are using is developed in onsite (It is developed in the earlier 1990) and we are testing it in offshore and we are not familiar with the code which is used for the Label.

We are thinking that the control we are testing is a Label control.

Ours is a banking application where the calculated values of the loan are displayed in the form or label captions.

No joy. ;)

I tried this against it:

#include <array.au3>

Opt("WinTitleMatchMode", 4)

; Wait for the window
While 1
    If WinExists("[CLASS:ThunderRT6FormDC;TITLE:Form1]") Then
        ConsoleWrite("Debug: Found window." & @LF)
        $hWin = WinGetHandle("[CLASS:ThunderRT6FormDC;TITLE:Form1]")
        ExitLoop
    EndIf
    ConsoleWrite("Debug: Don't see window yet..." & @LF)
    Sleep(1000)
WEnd

; Get all control classes from the window
$sClasses = WinGetClassList($hWin)
$avClasses = StringSplit($sClasses, @LF)
; Strip probably empty last element...
If StringStripWS($avClasses[$avClasses[0]], 8) = "" Then 
    _ArrayDelete($avClasses, $avClasses[0])
    $avClasses[0] = UBound($avClasses) - 1
EndIf

; Display class list from window
_ArrayDisplay($avClasses, "Debug: $avClasses")

I only got the button. That was surprising. It's like that label is a graphical background image of the main Form.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

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