#include "FileExplorerTreeAndListview UDF_doubleFunction.au3"
Opt("GUIOnEventMode", 1)

$GUI=GUICreate("Explorer",500,800)
$TreeView=GUICtrlCreateTreeView(10,10,480,385)
$ListView=GUICtrlCreateListView("",10,405,480,385)
GUISetState(@SW_SHOW)
$oExplorer=_TLE_CreateTreeViewExplorer(true,$TreeView,$ListView)
GUIRegisterMsg($WM_NOTIFY, '_WM_NOTIFY')
GUISetOnEvent($GUI_EVENT_CLOSE, "_ExplorerGui_Close")

_TLE_TreeViewOpenPath(@DesktopDir,$oExplorer)
_TLE_AddListviewFileDoubleClickFunction("_test")

while 1
	sleep(100)
WEnd

Func _test($param)
	ConsoleWrite($param&@crlf)
	ShellExecute($param)
EndFunc

Func _WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
	_TLE_WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam,$oExplorer)
	Return $GUI_RUNDEFMSG
EndFunc   ;==>_WM_NOTIFY

Func _ExplorerGui_Close()
	exit
EndFunc