1

I have an Stock program which developed by Delphi, I want a tools which can read the data from the stock program, for example, the stock price in Delphi grid object.

The Stock program under test is close source, so no chance modify source code which QTP/Robot inspector required. I cannot tell out which Delphi version it is using, neither the object is a standard delphi control.

So anyone can tell out is it possible to inspect that delphi program object data through other technology ?

thanks in advance.

brike
  • 313
  • 4
  • 10

2 Answers2

1

You can use a tool like Winsight to find out the structure of the program window, and use FindWindow and EnumerateChildWindows to find the controls. Then you can use GetWindowText api to get the text of the control. This will work with most controls, but might not work for all. For instance TLabel control has no handle, but does its drawing itself. It has not handle to get the text from and it won't show up in WinSight. You'll have to OCR the window to get those label texts. :p

But this 'testing' sounds more like 'hacking' or 'controlling' to me, if you don't even know what kind of controls are used and which version of Delphi is used, why are you the one testing this program this way?

GolezTrol
  • 114,394
  • 18
  • 182
  • 210
  • I am not testing this stock program, I just want to using computer read the data from the stock program, then run additional query such as filter, sort, condition combination which stock program does not provide, that's all. – brike Jun 04 '11 at 14:58
0

Trying to read data out of a Delphi grid control is not going to work out for you. It's not like a standard Windows edit control which you could just call GetWindowText on.

If you really want to get the information from this existing program then you'd need to poke at its internal memory or do an OCR on a screen grab. All pretty horrible to contemplate.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490