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.

Sample Code to Select the Floppy (A:) Drive with cSetTVItem

Keywords: 	 cSetTVItem  select Floppy (A:) Drive

Question:

I'm having problems selecting the 3-1/2 drive (A:) with CM. Can you help me out?

Answer:

Here's some sample code that will do it with 2001 Winbatch.
;RoboScripter
; Made with 
;   RoboScripter ver: 28
;   CtlMgr ver: 20026
AddExtender("wwctl34i.dll")

;Title: 
;ID: 40963
;Class: SysTreeView32
;Level: 4
window1=cWndByWndSpec("ExploreWClass","EXPLORER",5,40965,9999,40961,0,0)
window2=cWndByClass(window1,`BaseBar`)
; or window2=cWndBySeq(window1,4)
window3=cWndByID(window2,40965)
; or window3=cWndByClass(window2,`ReBarWindow32`)
; or window3=cWndBySeq(window2,1)
ControlHandle=cWndByID(window3,40963)
; or ControlHandle=cWndByClass(window3,`SysTreeView32`)
; or ControlHandle=cWndBySeq(window3,2)
cSetFocus(ControlHandle)  ; Activates Window


;Title: 
;ID: 40963
;Class: SysTreeView32
;Level: 4
window1=cWndByWndSpec("ExploreWClass","EXPLORER",5,40965,9999,40961,0,0)
window2=cWndByClass(window1,`BaseBar`)
; or window2=cWndBySeq(window1,4)
window3=cWndByID(window2,40965)
; or window3=cWndByClass(window2,`ReBarWindow32`)
; or window3=cWndBySeq(window2,1)
ControlHandle=cWndByID(window3,40963)
; or ControlHandle=cWndByClass(window3,`SysTreeView32`)
; or ControlHandle=cWndBySeq(window3,2)
cSetFocus(ControlHandle)
;cSetTVItem(ControlHandle,"Desktop%@TAB%My Computer%@TAB% (D:)")     ; Set SysTreeView32 item
cSetTVItem(ControlHandle,"Desktop%@TAB%My Computer%@TAB%3½ Floppy (A:)")     ; Set SysTreeView32 item




exit

Article ID:   W15050
File Created: 2002:09:05:13:49:18
Last Updated: 2002:09:05:13:49:18