Hi!
I've got this program runing and it puts out a number every 30s. It is shown in a label and I guess there must be a variable holding that number (d0h?).
Im trying to get that number, but I dont know how.
Please give me a hint what to look for.
Hugs // Babybacon
Get variable from other programs
- netmaestro
- PureBasic Bullfrog

- Posts: 8453
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Your label is a static control and you can get its contents with GetWindowText_():
All you need to know is the name of the window and which child the label is and you're set. It may be a matter of doing an EnumChildWindows_() when the label text is known and look for it. After that you'll know it's the third child on the window or whatever and you can grab it on that basis.
Code: Select all
w = FindWindow_(0,"A Window")
textgadget = GetWindow_(w, #GW_CHILD); You'll need to know which child
text.s = Space(#MAX_PATH)
GetWindowText_(textgadget, @text, #MAX_PATH-1)
Debug textBERESHEIT
