开发者

Delphi, read data from 3rd party data field

I am writing an application that needs to read a data field on another Delphi program and I do not have access to the source code of the 3rd party program. The data field contains the "foreign key" to a record I need to retrieve or create in my application.

I would appreciat开发者_如何学JAVAe any links to knowledge or components that will help me with my program.


I'm assuming that you are trying to "screen scrape" a text field from another app. You can use FindWindow to get a handle that that window, then dig through the child windows to find the control that you're looking for (WinDowse by Greatis will be very helpful here for exploring manually). Finally, send a WM_GetText message to the control that has the data. Here is an example of how to do this: About.Com article on digging and scraping with Internet Explorer.

Edit: D'oh! WM_GetText is already wrapped in the VCL with the GetWindowText function defined in windows.pas. ex:

GetWindowText(Wnd, PC, sizeof(PC));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜