WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Control Manager
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Checking Status bar of application

Keywords:     cWndInfo	 Status bar

Question:

I would like to pull some information from a status bar of an application. I ran WinInfo and have the class and Identification of the status bar but none of the control extenders looked like the right one to me. Can you help?

The window-info on the bar is...

	Child G-Child Class Ident
	2 msctls_statusbar32 59393
	X NONE
Thanks...

Answer:

The suggested way to do it is to use the cWndById function.

Note: If we can get at the text of the status bar, then it will be displayed under the "TITLE" section of the Windows Analysis Script. If the text does not display there, then we probably can't get at it.

If the text does display, use something like:

titlewnd=DllHwnd("Vflana")
thishwnd=cWndByID(titlewnd,59393)
text=cGetEditText(thishwnd)
If your text displays in the "TITLE" section, but you can't retrieve it using the method above, I would try a cWndInfo request 0 to try to get the text out of the status bar. It might work.

If the title of the object is blank, the Control Manager cannot read the contents of the control. If the Statusbar thingy is not designed to be computer-readable, there are various HARD ways to accomplish the task:

  1. Figure out who makes the statusbar and ask them how it can be read by another program. Ask the company that makes the software to supply you with an id, or get them to tell you where you can, with a hex editor, give the window a title, if possible.

  2. Snapshot the application window to the clipboard move it to a file, then to a binary buffer and try to figure out the bytes change when the status message shows up so you can check for them.

  3. Monitor CPU activity by detecting how long in real time it takes you to execute a loop of code, and from that infer when the other application is no longer using the processor.
All these methods are ugly and hard to make work correctly.
Article ID:   W12506
Filename:   Get Text Out of Status Bar.txt
File Created: 2017:07:28:13:58:26
Last Updated: 1999:04:15:16:47:42