atzoref Posted October 22, 2012 Posted October 22, 2012 Hi, I have a control on external GUI which has this control "ThunderRT6UserControlDC" It's kind of progress bar or somehing like that which present a number with colored bar which change according to the number. My question is: How can I read this number on it? (ControlGetText doesn't work) Details: >>>> Window <<<< Title: AAA Class: ThunderRT6FormDC Position: 22, 55 Size: 600, 676 Style: 0x16CA0000 ExStyle: 0x00040100 Handle: 0x000000000018077A >>>> Control <<<< Class: ThunderRT6UserControlDC Instance: 1 ClassnameNN: ThunderRT6UserControlDC1 Name: Advanced (Class): [CLASS:ThunderRT6UserControlDC; INSTANCE:1] ID: Text: Position: 280, 24 Size: 81, 17 ControlClick Coords: 67, 8 Style: 0x56000000 ExStyle: 0x00000000 Handle: 0x00000000000403A0 Thanks.
FireFox Posted October 22, 2012 Posted October 22, 2012 Hi, What application are you trying to read the text from ? Can you make a screen shot? Br, FireFox.
atzoref Posted October 22, 2012 Author Posted October 22, 2012 I took a picture of the control, the control is in the circle
JohnOne Posted October 22, 2012 Posted October 22, 2012 And the application? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
water Posted October 22, 2012 Posted October 22, 2012 (edited) I found the following code on the german AutoIt forum to get the value of an external progressbar: Global $hControlHandle = ControlGetHandle("Window title", "", "[CLASS: ProgressBar20WndClass; INSTANCE:2]") MsgBox(0,"","Percent: "&_Progress_GetPos($hControlHandle)) Func _Progress_GetPos($hWnd) Local $ret = DllCall("User32.dll", "int", "SendMessage", "hwnd", $hWnd, "int", 1032, "int", 0, "int", 0) Return Number(StringReplace($ret[0], ",", ".")) EndFunc ;==>_Progress_GetPos Edited October 22, 2012 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
atzoref Posted October 23, 2012 Author Posted October 23, 2012 I found the following code on the german AutoIt forum to get the value of an external progressbar: Global $hControlHandle = ControlGetHandle("Window title", "", "[CLASS: ProgressBar20WndClass; INSTANCE:2]") MsgBox(0,"","Percent: "&_Progress_GetPos($hControlHandle)) Func _Progress_GetPos($hWnd) Local $ret = DllCall("User32.dll", "int", "SendMessage", "hwnd", $hWnd, "int", 1032, "int", 0, "int", 0) Return Number(StringReplace($ret[0], ",", ".")) EndFunc ;==>_Progress_GetPos But I have a different Class type (ThunderRT6UserControlDC) I tried this but it returns 0.
FireFox Posted October 23, 2012 Posted October 23, 2012 Can you provide the application name please? So we can test it ourselves. Br, FireFox.
water Posted October 23, 2012 Posted October 23, 2012 But I have a different Class type (ThunderRT6UserControlDC)I tried this but it returns 0.I just copied the code I've found. You have to change it to your needs My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
atzoref Posted October 23, 2012 Author Posted October 23, 2012 I just copied the code I've found. You have to change it to your needs I know, I have already change it but it didn't work with the class I have.And the App is a privat on my company, so it will not help you.
water Posted October 23, 2012 Posted October 23, 2012 Then I have run out of ideas My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
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