atzoref Posted October 22, 2012 Share 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. Link to comment Share on other sites More sharing options...
FireFox Posted October 22, 2012 Share Posted October 22, 2012 Hi, What application are you trying to read the text from ? Can you make a screen shot? Br, FireFox. Link to comment Share on other sites More sharing options...
atzoref Posted October 22, 2012 Author Share Posted October 22, 2012 I took a picture of the control, the control is in the circle Link to comment Share on other sites More sharing options...
JohnOne Posted October 22, 2012 Share 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. Link to comment Share on other sites More sharing options...
water Posted October 22, 2012 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
atzoref Posted October 23, 2012 Author Share 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. Link to comment Share on other sites More sharing options...
FireFox Posted October 23, 2012 Share Posted October 23, 2012 Can you provide the application name please? So we can test it ourselves. Br, FireFox. Link to comment Share on other sites More sharing options...
water Posted October 23, 2012 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
atzoref Posted October 23, 2012 Author Share 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. Link to comment Share on other sites More sharing options...
water Posted October 23, 2012 Share Posted October 23, 2012 Then I have run out of ideas My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
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