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.


Control Manager

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

Control Manager with "Owner-Draw" and System Listboxes

Keywords:       "Owner-Draw" system Listboxes


I am trying to automate Hardware Profiles. With WinBatch and the Control Manager I can drive the Control Panel applet to create two more profiles...

The next function I need is to set the Devices. I can launch the Device applet by:

        Run("rundll32.exe", "shell32.dll,Control_RunDLL srvmgr.cpl,@2")
The next thing I want to do is to extract the contents of the ListBox... I obtain the windows Handle and send the Control ID but I get junk back...

Does WinBatch support those types of ListBoxes?

It is in Windows NT 4.0...

In fact it is a single Column listbox, but it looks like Microsoft has some kind of "fixed space thing to separate the different sections..."

Please look at it to see if WinBatch can handle the goofy string that Microsoft put into a Single column listbox.


Sorry. No. Just standard listboxes. It appears to be an "owner-draw" listbox. Can't get to it.

I suggest rooting around in the registry to find where the information is stored and look at that. It should all be there.

cGetLBText also can't see SysListView32 or SysTreeView type listboxes in the older versions of the Control Manager Extender, so be sure you have the latest one.

If you can determine what position it is in the list with ItemLocate, then sending a few downarrows and a space ought to select it. Something like:

   select1=ItemLocate("Oracle Installer", response, @tab)
   if select1==0
      Message("Oracle Installer","Not Found")
      SendKeysTo("Software Asset Manager","{DOWN}{HOME}{DOWN %select1%}{SPACE}")

Here HOME takes it to the top of the list, then the DOWNs take it to where you need it and SPACE selects it. Often, a downarrow key is needed before the HOME key will work.
Article ID:   W12492
Filename:   cGetLBText - cSetLBText with some Types of Listboxes.txt
File Created: 2017:07:28:13:58:24
Last Updated: 1999:08:10:15:29:00