0

I have an application A, which has a little text box, surrounded by a frame, which indicates whether the system is ready or not. The text and the frame reside inside a Delphi TSemaphor control.

  1. During initialization, the frame is yellow.
  2. When the initialization has completed and the system is ready, the frame turns green.

In another application B, I need to detect when application A has been initialized and is ready.

How can I do this (detect change of color of the frame) in application A with least possible effort and under following constraints

  1. application A cannot be changed (I don't have its source code),
  2. application A has no automation interface,
  3. the only change that occurs, when the application A becomes ready, is the color change

?

There are following approaches to solving this problem I'm aware of:

  1. Use image recognition (http://sikuli.org/)
  2. Find out the color of the pixel at the respective position.
  3. Use an injected DLL to get access to TSemaphore attributes.
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325
  • You've given three answers to your question already. What more are you expecting? (By the way, `TSemaphor` is not a standard Delphi control; it was probably built by the developers of the application you're trying to observe.) – Rob Kennedy Oct 01 '12 at 12:56
  • I expect a more ELEGANT solution, since each of the proposed methods has serious drawbacks. Methods 1 and 2 rely on the control always being at the same place (if the vendor of the application A releases a new version, where the control is located at another place, I'll need to update application B). Method 3 is complicated by its very nature and I try to avoid it. – Glory to Russia Oct 01 '12 at 13:14
  • There isn't going to be a more elegant solution. – David Heffernan Oct 04 '12 at 06:28

0 Answers0