Im making a program in wich I need to monitore (import) a variable (number from an other program window every time the variable changes. There are very much other information in this window but I only want this number that is occuring at a sertain position in the window. How do I do this? with hooks?
Greatful for answeres.

Recommended Answers

All 3 Replies

Write the variable to a file everytime it changes, read it with your other program.

The other program is a bought statistics program and I cant save the variable to file because it changes real time. Isnt there someway to read activity in a window belonging to this statistics program.
I want this number in this window as an argument for a function and that everytime it changes.

You could TRY getting a handle to the window, using SendMessage WM_GetText and see if you get the text. If you do, sort through it for the variable you want..

Another way would be to hook the program and grab the information you want. Also one other way I can think of is to ReadProcessMemory. This should be used if you know how to get the memory address of the variable you want to read.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.