Code: Select all
ViewIt()
{
Global Tree
static r
if instr(A_Guievent, "Normal")
{
loop, 3
{
if instr(A_guicontrol, A_index)
continue
Gui, dash:listview, Box%A_index%
LV_Modify(0, "-Select")
}
Gui, dash:listview, %A_guicontrol%
LV_GetText(r, A_EventInfo,2)
Gui, dash:listview, %A_guicontrol%
msgbox, 4096, r, % r
if instr(substr(r, -3), "exe")
LoadGame(r)
if instr(substr(r, -3), "mp3")
LoadAudio(r)
if instr(substr(r, -3), "mp4")
LoadVideo(r)
if instr(substr(r, -3), "png")
LoadImage(r)
;GuiControl, Dash:Focus, Tree
}
Return
}
Code: Select all
Scroll(i:="") ;i = reset (the treeview was used to load a new folder)
{
Global
static temp
pag := i ? 0 : pag
if instr(A_GuiControl, "scrob")
pag := pag = 0 ? Lis.length() - (rws * 3) : pag - (rws * 3) < 0 ? 0 : pag - (rws * 3)
if instr(A_GuiControl, "scrof")
pag := pag = Lis.length() - (rws * 3) ? 0 : pag + (rws * 3) > LIS.length() - (rws * 3) ? Lis.length() - (rws * 3) : pag + (rws * 3)
chk := 0
lay := Lis.clone()
loop 3
{
Gui, Dash:listview, box%A_index%
LV_delete()
}
;msgbox, 4096, %pag%, % A_GuiControl ": " Lis.length()
loop % pag
Lay.removeat(1)
temp = 1
loop, % rws * 3 ;rws is the number of lines the listview can display.
{
if temp = 4
break
; if ! lay.length()
; lay := LIS.clone()
Gui, listview, box%temp%
line := Lay.removeat(1)
SplitPath,line,,,, nax
Lv_add("",nax,line)
LV_modifycol(1,box)
LV_modifycol(2,0)
if !mod(A_index, rws)
temp ++
if (A_index > LIS.length())
break
}
return
}