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.

cSetTvItem Windows Explorer Issue


Question:

I am using Roboscripter to select a folder in the Windows Explorer. However it never seems to select (highlight) the correct folder. Can you explain?

Once I do get it selected how do I get it to show the contents of the folder in the right hand frame?

Answer:

You should be able to use cDblClickItem to 'Open' the directory once it is selected.

From the developers: You may have problems selecting folders in Explorer. The treeview control's item list is constructed, in part, on the fly. The shell will not build the folder hierarchy until each folder has been expanded.

To force the folder hierarchy to be built, you will apparently need to expand each subfolder individually:

;RoboScripter
; Made with
;   RoboScripter ver: 42
;   CtlMgr ver: 20035
AddExtender("wwctl44i.dll")
Run("Explorer.exe","")

window1=cWndByWndSpec("ExploreWClass","explorer",5,40965,9999,40961,0,0)
window2=cWndbyclass(window1,`BaseBar`)
window3=cWndbyid(window2,40965)
ControlHandle=cWndbyclass(window3,`SysTreeView32`)
cSetFocus(ControlHandle)
cSetTvItem(ControlHandle,"Desktop")
cDblClickItem(ControlHandle,0)     ;Double-Click item in TreeView controls
cSetTvItem(ControlHandle,"Desktop%@TAB%My Computer")
cDblClickItem(ControlHandle,0)     ;Double-Click item in TreeView controls
cSetTvItem(ControlHandle,"Desktop%@TAB%My Computer%@TAB%Local Disk (C:)")
cDblClickItem(ControlHandle,0)     ;Double-Click item in TreeView controls
cSetTvItem(ControlHandle,"Desktop%@TAB%My Computer%@TAB%Local Disk (C:)%@TAB%Windows")
cDblClickItem(ControlHandle,0)     ;Double-Click item in TreeView controls
Exit

Article ID:   W16821
File Created: 2007:07:03:14:26:24
Last Updated: 2007:07:03:14:26:24