Hallo alle zusammen!!!,
Ich habe folgendes Problem: Ich möchte so wie im Bild zwei ComboBoxen (jeweils mit Laufwerkinhalt) und einer Tree-Struktur des ausgewählen Laufwerks anzeigen lassen. Der gewählte Inhalt sollte denn in der MItte angezeigt werden.
autoit.de/wcf/attachment/7396/
Wer kann mir dabei helfen und Tipps geben?
Spoiler anzeigen
#Include <Array.au3>
#include <Constants.au3>
#Include <File.au3>
#include <GDIPlus.au3>
#include <GUIComboBox.au3>
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
#include <GuiImageList.au3>
#include <Process.au3>
#include <StaticConstants.au3>
#include <TreeViewConstants.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
Opt("WinTitleMatchMode", 4)
[/autoit] [autoit][/autoit] [autoit]Local $filemenu, $fileitem, $recentfilesmenu, $separator1, $var, $add, $treetoview1, $GetIcon
Local $exititem, $helpmenu, $aboutitem, $Apsbutton, $Unapsbutton, $Checkbox, $Runbox
Local $msg, $file, $file2, $fileitem2, $View2, $View3, $Deletebutton, $to1, $to2, $toPath, $item1, $ViewItem1, $a2
Local $Drivers1, $Drivers2, $Readdriver1, $Readdriver2, $driver
Global $hGUI, $hImage, $hGraphic, $i, $iF, $aFiles, $aDirectorys, $aDirNames, $aFileNames, $i2, $iF2, $aFiles2, $aDirectorys2, $aDirNames2, $aFileNames2
Global $i3, $iF3, $aFiles3, $aDirectorys3, $aDirNames3, $aFileNames3, $hList32
; Global left box
Global $hMigration, $hExplHolder, $hExplorer, $sStartDir = "D:\", $sStartDir2= "C:\"
#forceref $separator1
[/autoit] [autoit][/autoit] [autoit]; file
$hGUI = GUICreate("Aps / Unaps - by MacroMan", 575, 260, Default, Default, BitOR($GUI_SS_DEFAULT_GUI, $WS_CLIPCHILDREN, $WS_SIZEBOX), 0x00000010)
; Buttons
$Apsbutton = GUICtrlCreateButton("Aps", 333, 16, 70, 20)
$Unapsbutton = GUICtrlCreateButton("Unaps", 333, 56, 70, 20)
$Deletebutton = GUICtrlCreateButton("Delete", 333, 96, 70, 20)
$Checkbox = GUICtrlCreateCheckbox("To hide", 333, 156, 70, 20)
$exititem = GUICtrlCreateButton("Exit", 333, 226, 70, 20)
$to1 = _GUICtrlComboBox_Create($hGUI, "", 5 ,5 ,165, 20)
$to2 = _GUICtrlComboBox_Create($hGUI, "", 410 ,5 ,165, 20)
GUISetState(@SW_SHOW)
; Drivers left combo box
_GUICtrlComboBox_BeginUpdate($to1)
_GUICtrlComboBox_AddDir($to1, "", $DDL_DRIVES, False)
_GUICtrlComboBox_EndUpdate($to1)
; Drivers right combo box
_GUICtrlComboBox_BeginUpdate($to2)
_GUICtrlComboBox_AddDir($to2, "", $DDL_DRIVES, False)
_GUICtrlComboBox_EndUpdate($to2)
; Read from drivers left combo box
$Readdriver1 = GUICtrlRead($to1, 0)
; Read from drivers left combo box
$Readdriver2 = GUICtrlRead($to2, 0)
; Create left box
Run('explorer.exe /n, "' & $sStartDir & '"')
WinWait("[CLASS:CabinetWClass]")
$hExplorer = WinGetHandle("[CLASS:CabinetWClass]")
$hList32 = ControlGetHandle ($hExplorer, "", "[CLASS:SysListView32; INSTANCE:1]")
_WinAPI_SetParent($hList32, $hGUI)
[/autoit] [autoit][/autoit] [autoit]ControlListView ($hExplorer, "", $hList32, "ViewChange", "list")
WinSetState($hExplorer, "", @SW_HIDE)
WinMove($hList32, "", 5, 25, 165, 235)
; Create right box
Run('explorer.exe /n, "' & $sStartDir2 & '"')
WinWait("[CLASS:CabinetWClass]")
$hExplorer = WinGetHandle("[CLASS:CabinetWClass]")
$hList32 = ControlGetHandle ($hExplorer, "", "[CLASS:SysListView32; INSTANCE:1]")
_WinAPI_SetParent($hList32, $hGUI)
[/autoit] [autoit][/autoit] [autoit]ControlListView ($hExplorer, "", $hList32, "ViewChange", "list")
WinSetState($hExplorer, "", @SW_HIDE)
WinMove($hList32, "", 410, 25, 165, 235)
; Create middle box
$hList = GUICtrlCreateListView ("", 170, 5, 155, 256)
GUICtrlSetState (-1,
WinSetState($hExplorer, "", @SW_SHOW)
GUISetState(@SW_SHOW, $hGUI)
$aDirectorys3 = _FileListToArray($hList, '*.*', 1)
_ArrayDelete($aDirectorys3, 0)
; Read data in middle box
[/autoit] [autoit][/autoit] [autoit]; Function Menu
While 1
$msg = GUIGetMsg()
Switch $Msg
Case $GUI_EVENT_CLOSE
Exit
Case $exititem
Exit
Case $Apsbutton
_RunAps()
Case $UnApsbutton
_RunUnaps()
Case -3
Exit
Case -13
GUICtrlCreateListViewItem (@GUI_DRAGFILE, $hList)
EndSwitch
WEnd
;Function Run to "_aps.exe"
Func _RunAps()
Run("_aps.exe " & $aDirectorys3)
EndFunc ;==> RunAps
; Function Run to "_unaps.exe"
Func _RunUnaps()
Run("_unaps.exe " & $aDirectorys3)
EndFunc ;==> RunUnaps
LG