Jump to content

reading grid from program


pyromus
 Share

Recommended Posts

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
 
7030-8c9f8d21ab8b850f85976d77249a79d0.pn
 
 
 
 window info
7031-a736a5a930321cb50c4579b6a85476d2.pn

Edited by pyromus
Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.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 (NEW 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

 

Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.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 (NEW 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

 

Link to comment
Share on other sites

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 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.
Link to comment
Share on other sites

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 ?

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...