cGetLBText and 248 error: This listbox does not support retrieval of item text
Keywords: cGetLBText 248 error: This listbox does not support retrieval of item text
Question:
Can you tell me why cGetLBText cannot get the contents of the Devices applet listbox in the script below?AddExtender("WWCTL34I.DLL") Run("rundll32.exe", "shell32.dll,Control_RunDLL srvmgr.cpl,@2") i=1 While !WinExist("Devices") Delay(1) i=i+1 If i > 60 Then GoTo Err EndWhile WinActivate("Devices") dvcs=DllHwnd("Devices") lstbox=cWndByID(dvcs, 5501) response=cGetLBText(lstbox) enabledvcs=ItemLocate("i8042 Keyboard and PS/2 Mouse Pro Started", response, @TAB) cSetLBItem(lstbox,enabledvcs)Answer:
I ran your script on NT4 and can see that it generates the error message, "Wil Extender error: 248: This listbox does not support retrieval of item text," on the line, response=cGetLBText(lstbox).I talked to the developers about it, and they said they have no way of retrieving the items in that particular type of listbox, because it is Owner Drawn - meaning that the parent dialog of that listbox has the text and the child window produces it on the fly with a query. The developers said they know of no mechanism to get at the contents of that type of listbox.
So you're out of luck with this one.
Article ID: W14328Filename: cGetLBText and 248 Error.txt