mmahima Posted August 2, 2007 Posted August 2, 2007 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
PsaltyDS Posted August 2, 2007 Posted August 2, 2007 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.ThanksShow 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
mmahima Posted August 6, 2007 Author Posted August 6, 2007 (edited) cwebpage.dllwe can identify other controls in the frame but unable to retrieve the text from the label Edited August 9, 2007 by mmahima
PsaltyDS Posted August 6, 2007 Posted August 6, 2007 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
mmahima Posted August 7, 2007 Author Posted August 7, 2007 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
Moderators SmOke_N Posted August 7, 2007 Moderators Posted August 7, 2007 We are using the AutoIt Window Info for the control information. Even it is not identifying the Label Control.Please find the attachmentThe 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.
mmahima Posted August 10, 2007 Author Posted August 10, 2007 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 .
PsaltyDS Posted August 10, 2007 Posted August 10, 2007 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
mmahima Posted August 14, 2007 Author Posted August 14, 2007 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 toolPrivate Sub Command1_Click()Label1.Caption = "Hello"End Sub
PsaltyDS Posted August 14, 2007 Posted August 14, 2007 The following is the code used in VB. We need to get the caption of the Label using the AutoIt toolPrivate Sub Command1_Click()Label1.Caption = "Hello"End SubThat 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
mmahima Posted August 14, 2007 Author Posted August 14, 2007 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.LabelButtonWhen 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
PsaltyDS Posted August 14, 2007 Posted August 14, 2007 In VB we have just added the two controls.LabelButtonWhen 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 methodYou 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
mmahima Posted August 16, 2007 Author Posted August 16, 2007 (edited) 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 August 16, 2007 by mmahima
PsaltyDS Posted August 16, 2007 Posted August 16, 2007 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now