pyromus Posted February 4, 2015 Posted February 4, 2015 (edited) Dear Friends I have been trying to get data from grid. i will use this data on my website. I can read handle of program. I can find handle of subwindow but I cant get data from subwindow. Can you give me idea for how i can get data from grid ? code that i can do until now is under. #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <GuiMenu.au3> #include <Array.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> #include <Crypt.au3> #include <File.au3> #include <WinAPIEx.au3> Func winhandl($title = "") ; Retrieve a list of window handles. Local $aList = WinList(); ; Loop through the array displaying only visable windows with a title. For $i = 1 To $aList[0][0] If StringInStr($aList[$i][0],$title) Then return ($aList[$i][1]); EndIf Next EndFunc ;==>Example $h = winhandl("Rithmic Trader"); ConsoleWrite("h "&$h & @CRLF); $pen = ControlGetHandle($h,"","[NAME:PRI_oGrid]"); ConsoleWrite("pen "&$pen & @CRLF); $text = ControlGetText($pen,"","[NAME:PRI_oGrid]") ConsoleWrite("output "&$text & @CRLF); I have to get all data from rows and columns. I need help. picture of window window info Edited February 4, 2015 by pyromus
pyromus Posted February 4, 2015 Author Posted February 4, 2015 (edited) i saw this project was with c# or c++ but i dont know this languages. i just know autoit. if it is possible, i would like to do with autoit Edited February 4, 2015 by pyromus
water Posted February 4, 2015 Posted February 4, 2015 Doesn't the program offer a way to access the content of the grid (via COM or by exporting the data)? Automating Windows Forms isn't easy (if possible at all) with AutoIt. 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
water Posted February 4, 2015 Posted February 4, 2015 Is this a program written by a 3rd party? If yes, do you have a documentation for this product? 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
pyromus Posted February 4, 2015 Author Posted February 4, 2015 yes sure. there is api of this program but it is written by c++. i just know autoit. isnt there simple way to code this ?
jdelaney Posted February 4, 2015 Posted February 4, 2015 (edited) You can go the ugly route of controlsend to copy data to your buffer, and split it by @Tab and @crlf (if you can select mutliple, or all, records). Depends how the grid reacts. API is the way to go. Edited February 4, 2015 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
pyromus Posted February 4, 2015 Author Posted February 4, 2015 You can go the ugly route of controlsend to copy data to your buffer, and split it by @Tab and @crlf (if you can select mutliple, or all, records). Depends how the grid reacts. API is the way to go. jdelaney CTRL + A does not work on this grid in program, Copy does not work. just work on first cell of grid. i dont know c++ for this reason i dont want to use api. do you have any idea ?
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