
sparker366
Active Members-
Posts
56 -
Joined
-
Last visited
About sparker366
- Birthday 07/23/1961
sparker366's Achievements

Wayfarer (2/7)
0
Reputation
-
Why the reverse order for deleting the items? Yea the StringTrimRight is the key lots simpler. Not sure why I didn't think of that. That doesn't seem something I could have figured out or found Very frustrating. Now do I have to have the BeginUpdate and EndUpdate in there as well while doing the deletion from the list? I tried that with my script but it made no difference Thanks for the help
-
Ok I just didn't want to get in the habit of posting my full script but here it is. I used this script to create my testing directories Called it 2x's to create both directories. ;Create 2 directories and populate them with test files Local $sSourcePath = "e:\testing\" Local $sDestPath = "e:\testing1\" Local $sSourceDir = "SrcDir" Local $sDestDir = "DestDir" Local $sFilename = "Test" Local $sFileExt = ".txt" ;DirCreate($sDestPath & $sDestDir) For $i = 1 To 10 FileOpen($sDestPath & $sDestDir & $i + 10 & "\" & $sFilename & $i + 10 & $sFileExt, 10) FileClose($sFilename) Next Here is my code. Excuse the sloppiness of it and any inefficiencies in it. This is just testing code not the full code. Once I get the move directory code working I will implement that into the full script and then move on to the next stage. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <RecFileListToArray.au3> #include <File.au3> #include <Array.au3> Local $aRecords Local $aArray Local $aLVItems Local $spath = "d:\Scripts-Programming\" ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Local $iItemCount Local $sLVItems ;Get Test Data $aArray = _RecFileListToArray($spath, "*", 2, 1, 1, 2) ;Create the GUI Local $Form1_1 = GUICreate("Move files", 1058, 601, 192, 124) Local $Label1 = GUICtrlCreateLabel("Source", 112, 32, 212, 17, $SS_CENTER) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") Local $Label2 = GUICtrlCreateLabel("Destination", 696, 32, 212, 17, $SS_CENTER) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") Local $btn1 = GUICtrlCreateButton("Delete Entries", 288, 544, 75, 25) Local $btn2 = GUICtrlCreateButton("Move Dir", 440, 544, 75, 25) Local $btn3 = GUICtrlCreateButton("Quit", 600, 544, 75, 25) Local $hListView1 = GUICtrlCreateListView("", 16, 64, 500, 400, BitOR($LVS_REPORT, $LVS_NOCOLUMNHEADER, $LVS_SHOWSELALWAYS), BitOR($WS_EX_CLIENTEDGE, $LVS_EX_CHECKBOXES, $LVS_EX_FULLROWSELECT)) Local $hListView2 = GUICtrlCreateListView("", 536, 64, 500, 400, BitOR($GUI_SS_DEFAULT_LISTVIEW, $LVS_NOCOLUMNHEADER)) Local $Input1 = GUICtrlCreateInput("Input1", 336, 480, 329, 21) GUISetState(@SW_SHOW) ;Main Script _GUICtrlListView_InsertColumn($hListView1, 0, "Path", 900) If IsArray($aArray) Then For $i = 1 To $aArray[0] _GUICtrlListView_AddItem($hListView1, $aArray[$i], $i) Next Else MsgBox(0, "Error", "No Array Created") EndIf While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE Exit Case $nMsg = $btn1 $sSelection = "" $iCount = 0 For $iIndex = 0 To $aArray[0] - 1 If _GUICtrlListView_GetItemChecked($hListView1, $iIndex) Then $sSelection &= "," & $iIndex +1 $iCount += 1 EndIf $iItem = 0 Next $sLVItems = StringReplace($sSelection, ",", "", 1) $aLVItems = StringSplit($sLVItems, ",") _ArrayDisplay($aLVItems) MsgBox(4160, "Information", "Selected Indices: " & @CRLF & $sSelection) MsgBox(4160, "Items Selected", "Items Selected: " & $iCount) $iItemCount = _GUICtrlListView_GetItemCount($hListView1) MsgBox(4160, "LV Item Count", "LV Item Count: " & $iItemCount) _GUICtrlListView_BeginUpdate($hListView1) For $iIndex = 1 to $aLVItems[0] _GUICtrlListView_DeleteItem(GUICtrlGetHandle($hListView1), $aLVItems[$iIndex]) Next _GUICtrlListView_EndUpdate($hListView1) $iItemCount = _GUICtrlListView_GetItemCount($hListView1) MsgBox(4160, "LV Item Count", "LV Item Count: " & $iItemCount) _GUICtrlListView_RedrawItems($hListView1, 0, $iItemCount) Case $nMsg = $btn2 MsgBox(0, "Move", "Move Directories") Case $nMsg = $btn3 MsgBox(0, "Quit", "Quit") Exit EndSelect WEnd Melba so what you are saying is make a work array after calling your UDF. Then use the array created by your UDF to populate the ListView and then in the code to delete checked items remove those items out of the work array with a loop through the work array using this _ArrayDelete then redraw the ListView with the updated work array. If that's the solution it does sound like a viable one. Actually not sure why I am using that path in here it should be on of the testing directories I created with that small script. But it works for what I am doing as I am just testing the ListView updation after removing checked items.
-
For my remove directory routine I need to update the ListView by removing the checked items as those will be moved and will no longer be a valid selection. I saw in post 17 of this thread Melba23 put in some code to return the selected indices from the ListView. Well I implemented that code to create an array of the selected indices and the resultant array had a blank row at the start. It seems that the string is being created with a leading delimiter thus adding an extra row to the beginning of the array. I didn't see a way to stop that with code to check for checked items so I used a StringReplace call to remove the beginning delimiter and all is good now. I can't see a way to have that not put a leading delimiter in the string that it creates. On to the next issue. _GUICtrlListView_DeleteItem will delete an item if you pass the index number to it. Well I selected 3 lines from the ListView and put those indices into an array. I then ran a For Loop to loop through that array and deleted the indices stored in it. Well I take a count of the ListView before and then a count after and it reflects the deleted items but the ListView Display is not updating correctly. Its only removing 1 item from the ListView Display. I need to have the ListView updated with the removed items. I can't seem to find anything to assist me with that. I thought about the redraw function and tried that but its not reflecting the removed items. How can I get it to reflect the removal of those items? I tried to redraw the ListView with the proper ending count and it still doesn't remove the deleted removed items from it. I searched on google for something and came up empty with regards to what I am trying to do.
-
BrewManNH I tooked at your sample code and ran it. It worked fine except it only moved 9 of the 10 directories. I saw that was because of the -1 you put on the For Loop. Do I have to use the -1 on the For Loop? Won't that give me 1 short of what I want to move? I removed the -1 from that line and it moved all the directories in the source directory. I will cut and paste that working code into the main script when I get to that part again. This what I came up with and it works great. I just followed your example and tested it and it worked fine. I will just implement it in the full script removing the test information code. $sDestPath = "e:\testing1" Local $File = FileOpen($sDestPath & "test.txt", 1) MsgBox(0, "Move", "Move Directories") $sSelection = FileRead("d:\dirs.txt") ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sSelection = ' & $sSelection & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console $aDirectories = StringSplit($sSelection, @CRLF, 1) MsgBox(0, "Dir Count", $aDirectories[0]) For $iIndex = 1 To $aDirectories[0] MsgBox(0, "Directory Move", "Directory moving" & " " & $aDirectories[$iIndex]) FileWrite($File, $aDirectories[$iIndex]) $sret = DirMove($aDirectories[$iIndex], $sDestPath, 1) MsgBox(0, "Dir Move Code", $sret) Next FileClose($File) I have totally screwed up my code. I recovered a viable source from a backup that was created. I have add the code to populate the other ListView on the GUI. I want the left hand ListView (ListView1) to multi checkboxes and the right hand ListView (ListView2) to only allow a single checkbox. I have the following code to create the ListViews Local $hListView1 = GUICtrlCreateListView("", 16, 64, 500, 400, BitOR($LVS_SHOWSELALWAYS, $LVS_REPORT, $LVS_NOCOLUMNHEADER), BitOR($WS_EX_CLIENTEDGE, $LVS_EX_CHECKBOXES, $LVS_EX_FULLROWSELECT)) Local $hListView2 = GUICtrlCreateListView("", 536, 64, 500, 400, BitOR($LVS_SHOWSELALWAYS, $LVS_REPORT, $LVS_NOCOLUMNHEADER, $LVS_SINGLESEL), BitOR($WS_EX_CLIENTEDGE, $LVS_EX_CHECKBOXES, $LVS_EX_FULLROWSELECT)) Now I think I figured it out. Since a checkbox is not a selection there is now way to limit that. Now I have changef ListView2 to a selection only ListView and kept ListView1 a checkbox one. Now I changed the below code to get the cheked boxes for loop 1 and the second loop only gets the item selected. This is the code to check for the checked items. Its only a snippet of the full script. $nMsg = GUIGetMsg() $sSelection = _GUICtrlListView_GetSelectedIndices($hListView1) Select Case $nMsg = $GUI_EVENT_CLOSE Exit Case $nMsg = $btn1 $sSelection = "" $iCount = 0 $iCount1 = 0 For $iIndex = 0 To $aArray[0] - 1 If _GUICtrlListView_GetItemChecked($hListView1, $iIndex) Then $sItem &= _GUICtrlListView_GetItemText($hListView1, $iIndex) & @CRLF $iCount += 1 EndIf Next $aItem = StringSplit($sItem, @CRLF, 1) _ArrayDisplay($aItem1) For $iIndex1 = 0 To $aArray1[0] - 1 If _GUICtrlListView_GetItemSelected($hListView2, $iIndex1) Then $sItem1 &= _GUICtrlListView_GetItemText($hListView2, $iIndex1) & @CRLF $iCount1 += 1 EndIf Next MsgBox(4160, "Information", "String Selected:" & " " & $sitem1) MsgBox(4160, "Information", "Selected Count: " & $iCount & " $aArray[0]" & " " & $aArray[0]) MsgBox(4160, "Information", "Selected Count: " & $iCount1 & " $aArray1[0]" & " " & $aArray[0]) Case $nMsg = $btn2 MsgBox(0, "Move", "Move Directories") Case $nMsg = $btn3 MsgBox(0, "Quit", "Quit") Exit EndSelect The above code is now working to return an array of itmes checked and a string of the item selected. Now when I check 3 items in ListView1 and display the array of the checked items it display the following [0]|4 [1]|e:\testing\SrcDir1 [2]|e:\testing\SrcDir10 [3]|e:\testing\SrcDir2 [4]| This is showing me what you all have been telling me to do a -1 from the $aArray[0] value to get the correct amount of elements I have no idea what is going on with my brain. Its not seeing things clearly. I did take a short break from this to try and clear it out but it seems that it did't work. I am just going to try and slow down and think more clearly and logically while doing this stuff. Again thanks for everyone's help. I'll get this sorted out eventually. I will post back when I get the dirmove code working. If you see anything that can be changed to make it more efficient please don't hesitate to suggest it. Now If the destination directory doesn't exist I want the option of creating it. Hence the input box on the GUI. I guess I need to have routine that begins with _GUICtrlListView_BeginUpdate add the newly created directory to the list view close it with _GUICtrlListView_EndUpdate and then call _GUICtrlListView_RedrawItems to refresh it. Now _GUICtrlListView_RedrawItems requires a range from what I am seeing so I would use 0 to start then use _GUICtrlListView_GetItemCount to get me the total count of items and use that as the ending range for the RedrawItems function. So that should update the ListView
-
Ok the stringsplit was the issue. The CR was causing the issue. Adding CRLF to it fixed it. Now another issue with my stringsplit was the flag. I see you used a 1 in yours and I omitted it. With doing that it added extra rows in the array thus causing dirmove failures. I added the 1 at the end an all is good. Sorry what do you mean by this "BTW, it's easier to troubleshoot code if it is actually runnable." Do you mean I should compile it. That is just a snippet from the whole script. I usually just save it and use the beta run from the tools menu. When this goes production it will be an exe Thanks for the help. I have no idea why I had the CR in there and not an CRLF. The script is working just fine. Oh I am going to be leaving the filewrtie in there as I need create a playlist for VideoLan of the paths and filenames so I can play them I just have to figure out that stage out later. Again thanks for the input.
-
Ok I have been having issues with the DirMove call. Its returning code 0 which is a failure. I am not sure why. This is just a code snippet from my full script. I didn't include the full script. $iIndex = 0 MsgBox(0, "Move", "Move Directories") $aDirectories = StringSplit($sSelection, @cr) For $iIndex = 0 To $aDirectories[0] - 1 msgbox(0, "Directory Move", "Directory moving" & " " & $aDirectories[$iIndex]) FileWrite($File, $aDirectories[$iIndex]) $sret = DirMove($aDirectories[$iIndex], $sDestPath) MsgBox(0, "Dir Move Code", $sret) Next FileClose($File) Ignore the msgbox's as that is just for testing purposes and also am writing the paths out a file. For that life of me I can't figure out what the error is.I have the full path without trailing slash being passed to it. Here is the paths being past to it from the filewrite e:\testing\SrcDir1 e:\testing\SrcDir10 e:\testing\SrcDir2 e:\testing\SrcDir3 The above is that paths getting passed to DirMove. Each directory has a text file it. The text files are empty but its still a file. They are valid and no trailing slash. I added the 1 to the end of the DirMove call and it moved the first directory then error out on the remaining directories. I have no idea what is going on here. I have checked everything to make sure the values of the paths are correct and they are. At wits end on this one. Debugging with msgbox's is showing the correct path is getting passed to the DirMove function but its returning 0 which means it failed.
-
Ok I must be brain dead this morning. I have no reason why I didn't think of the "text" aspect of the ListView to get the values I needed. I just thought by getting the checked item that would have the value I wanted. So yes the _GUICtrlListView_GetItemText does what I need. So now to build that in and build an array so I can loop through that array and move the directories that were checked. Again not sure why i didn't think about the text attribute of the ListView but again your help has got me moving forward. Now I would also want to use _GUICtrlListView_GetItemCount so I can use that as the value for the for loop to loop through and get checked items or I could just reuse the count from your UDF I call to populate the ListView. I best use this _GUICtrlListView_GetItemCount to be safe.
-
LOL you know what after I went and laid down I realized I used the wrong method. I was just getting back up to look for checked instead of selected methods and redo my code. Thanks for the reply. Now how do I get the values returned for the checked items in the ListView? You are just creating a variable with what row numbers were selected in the list view.I how do I get the actual value to display. I have tried to use this _GUICtrlListView_GetItemChecked and it only returns "True" if I run the sample script from the help file for that function. I have poured through the help file looking for a way to display the values of the checked items but I am coming up blank. I knew that I needed to use checked items instead of selected items once I took a nap and thought on it. You also told me that in your post..
-
Below is my current code for this script. i am having issues getting the selected items in the list. There are 21 directories being returned by _RecFileListToArray, as indicated in the first msgbox. The 1st msgbox in the while loop is not showing any value. When I select items from the list the second msgbox in the while loop is showing 0. However sometimes it will display a number other then 0. So I am having issues getting the returned selections from the ListView. If I can't get the items selected then there is no way I can move the directories. I have been reading the helpfile very closely and some of the code is taken from there. Unless I am missing something or have to use the _GUICtrlListView_SetItemSelected to set the selected items, which I don't know how to do unless there is an on click event for the ListView that needs to be read. Am I missing a ListView style or extended style that needs to be set? Nothing I have tried seems to return the items selected or the count of the items selected. The array is populated with directories as shown by the msgbox displayed after this statement is run "$aArray = _RecFileListToArray($spath, "*", 2, 1, 1, 2)" #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <RecFileListToArray.au3> #include <File.au3> #include <Array.au3> Local $aRecords Local $aArray Global $spath = "d:\Scripts-Programming\" ;Get Test Data $aArray = _RecFileListToArray($spath, "*", 2, 1, 1, 2) MsgBox(0, "Result", @error & " " & @extended & " " & $aArray[0]) #region ### START Koda GUI section ### Form=d:\scripts-programming\koda_1.7.3.0\forms\move-files.kxf Local $Form1_1 = GUICreate("Move files", 1058, 601, 192, 124) Local $Label1 = GUICtrlCreateLabel("Source", 112, 32, 212, 17, $SS_CENTER) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") Local $Label2 = GUICtrlCreateLabel("Destination", 696, 32, 212, 17, $SS_CENTER) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") Local $btn1 = GUICtrlCreateButton("Create Dir", 288, 544, 65, 25) Local $btn2 = GUICtrlCreateButton("Move", 440, 544, 60, 25) Local $btn3 = GUICtrlCreateButton("Quit", 600, 544, 60, 25) Local $hListView1 = GUICtrlCreateListView("", 16, 64, 500, 400, BitOR($LVS_REPORT, $LVS_NOCOLUMNHEADER, $LVS_SHOWSELALWAYS), BitOR($WS_EX_CLIENTEDGE, $LVS_EX_CHECKBOXES, $LVS_EX_FULLROWSELECT)) Local $hListView2 = GUICtrlCreateListView("", 536, 64, 500, 400, BitOR($GUI_SS_DEFAULT_LISTVIEW, $LVS_NOCOLUMNHEADER)) Local $Input1 = GUICtrlCreateInput("Input1", 336, 480, 329, 21) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### ;Main Script _GUICtrlListView_InsertColumn($hListView1, 0, "Path", 900) If IsArray($aArray) Then For $i = 1 To $aArray[0] _GUICtrlListView_AddItem($hListView1, $aArray[$i], $i) Next Else MsgBox(0, "Error", "No Array Created") EndIf While 1 $nMsg = GUIGetMsg() $sSelection = _GUICtrlListView_GetSelectedIndices($hListView1) Select Case $nMsg = $GUI_EVENT_CLOSE Exit Case $nMsg = $btn1 MsgBox(4160, "Information", "Selected Indices: " & $sSelection) MsgBox(4160, "Information", "Selected Count: " & _GUICtrlListView_GetSelectedCount($hListView1)) Case $nMsg = $btn2 MsgBox(0, "Move", "Move Directories") Case $nMsg = $btn3 MsgBox(0, "Quit", "Quit") Exit EndSelect WEnd
-
BrewManNH I did search the forums for that information and came up empty on my first attempt. On my second pass through I got lucky and found a post with some information in it and looked at _GUICtrlListView_GetSelectedIndices. Well I have made some headway in learning this GUI stuff. I created a GUI for testing listview stuff. I was able to populate it with information from a file. It works and now I am getting familiar with the styles and ext-styles of the GUI controls. Now I am going to add a button to pop a msgbox up and display the checked items in the listview. What I can't figure out from the help file for _GUICtrlListView_GetSelectedIndices is how to have it return an array instead of a delimited string. The ListView is going to have paths in it. I don't want to add another step by splitting the returned string into an array. If I have to so be it. Its then going to looped through that resultant array and move the directories to the destination directory. I then have to refresh the list view by calling this _GUICtrlListView_DeleteItemsSelected which I hope works with the checkboxes. I don't think it wouldn't as those rows are selected via checkboxes. Next to play with kodo and see if I can make this GUI abit nicer. I did mess with the listview and made the column huge so it puts the hsroll bar in. The vscroll is auto added due to the size of the information being added. One last thing. The size of the GUI. Since I am working with 2 listviews and 4-5 buttons and an input box needs to be fairly large. I am at 1920x1080 and since this is only going to be run on my comp can I make the gui like 1200x1200 or even somewhat bigger. I know that may sound like a silly question but since I have never done anything this major before using the GUI I am just curious. So I am about done for tonight. Will get back at it in the AM. Maybe I can have a semi working script sometime tomorrow? #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <RecFileListToArray.au3> #include <File.au3> #include <Array.au3> Local $aRecords Global $logfile = "d:\logs\del2.log" ;Get Test Data from a file If Not _FileReadToArray($logfile, $aRecords) Then MsgBox(4096, "Error", " Error reading log to Array error:" & @error) Exit EndIf #Region ### START Koda GUI section ### Form=d:\scripts-programming\koda_1.7.3.0\forms\move-files.kxf Local $Form1_1 = GUICreate("Move files", 1058, 601, 192, 124) Local $Label1 = GUICtrlCreateLabel("Source", 112, 32, 212, 17, $SS_CENTER) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") Local $Label2 = GUICtrlCreateLabel("Destination", 696, 32, 212, 17, $SS_CENTER) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") Local $btn1 = GUICtrlCreateButton("Create Dir", 288, 544, 65, 25) Local $btn2 = GUICtrlCreateButton("Move", 464, 544, 60, 25) Local $btn3 = GUICtrlCreateButton("Quit", 608, 544, 60, 25) Local $hListView1 = GUICtrlCreateListView("", 16, 64, 500, 400, BitOR($LVS_REPORT,$LVS_NOCOLUMNHEADER,$LVS_SHOWSELALWAYS), BitOR($WS_EX_CLIENTEDGE,$LVS_EX_CHECKBOXES,$LVS_EX_FULLROWSELECT)) Local $hListView2 = GUICtrlCreateListView("", 536, 64, 500, 400, BitOR($GUI_SS_DEFAULT_LISTVIEW,$LVS_NOCOLUMNHEADER)) Local $Input1 = GUICtrlCreateInput("Input1", 336, 480, 329, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ;Main Script _GUICtrlListView_InsertColumn($hListView1, 0, "Column 1", 900) For $i = 1 To $aRecords[0] _GUICtrlListView_AddItem($hListView1, $aRecords[$i], $i) Next While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE Exit Case $nMsg = $btn1 MsgBox(0, "Create", "Create Directories") Case $nMsg = $btn2 MsgBox(0, "Move", "Move Directories") Case $nMsg = $btn3 MsgBox(0, "Quit", "Quit") Exit EndSelect WEnd
-
Ok I got the buttons to popup msgbox's so that is step done. Now I am having a hard time understanding the CFF UDF and making it work. I tried to follow the second example script and its not making any sense to me. That second example script is for use with user designed GUI. I just can't follow it. What if i do this since I am having issues with following the CFF UDF what if I created 3 Listviews an input box Create Dir Button. Move Button and Quit Button. Use the RecFileListToArray UDF to pull all the directories out of my source directory and populate a listview. Then call it again to populate the destination listview. Now I was searching some and saw that you can select multiple rows in a ListView if you use the style $LVS_REPORT" and then you can also show checkboxes with this extended style $LVS_EX_CHECKBOXES. Now where do I go to find out how to cycle through a listview and retrieve the items with a selected checkbox? If I can do that I can either load that in an array and the pass that array to the dirmove function or just loop through the listview keying on the checkboxes checked and grab the path from there and move the directories. Not sure what would be more efficient? I feel that the CFF UDF would have been a nice way to do this project but the learning curve is just not there for me. Not sure why. I really don't need a treeview like I originally thought I may need. I can accomplish this with listviews and the check boxes and the report style. The list view is only going to be single column as its going to just have the full path and filename. So with that said I am going to mess around with listviews and the checkboxes and seeing if I can get the checked items and display them in a message box. I have my work cut out for me.
-
Ok I started working on the GUI for this project. I used KODA to design it and code it I am including a pic of it and the code. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <StaticConstants.au3> #include <TreeViewConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=D:\scripts\koda_1.7.3.0\Forms\Move-Files.kxf Local $Form1 = GUICreate("Move files", 666, 590, 192, 124) Local $TreeView1 = GUICtrlCreateTreeView(32, 56, 257, 257, BitOR($GUI_SS_DEFAULT_TREEVIEW,$TVS_FULLROWSELECT,$WS_HSCROLL,$WS_VSCROLL)) Local $TreeView2 = GUICtrlCreateTreeView(368, 56, 257, 257, BitOR($GUI_SS_DEFAULT_TREEVIEW,$TVS_FULLROWSELECT,$WS_HSCROLL,$WS_VSCROLL)) Local $List1 = GUICtrlCreateList("", 168, 368, 225, 136, BitOR($GUI_SS_DEFAULT_LIST,$WS_HSCROLL)) Local $Label1 = GUICtrlCreateLabel("Source", 32, 16, 212, 17, $SS_CENTER) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") Local $Label2 = GUICtrlCreateLabel("Destination", 360, 16, 212, 17, $SS_CENTER) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") Local $btn1 = GUICtrlCreateButton("Move", 256, 520, 60, 25) Local $btn2 = GUICtrlCreateButton("Quit", 336, 520, 60, 25) Local $Label3 = GUICtrlCreateLabel("Selected files", 216, 336, 147, 20, $SS_CENTER) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") Local $btn3 = GUICtrlCreateButton("Create Dir", 168, 520, 65, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd I haven't done anything else yet on this as I am first trying to figure out how to read button clicks. The help file is not to clear to me on it. i know something goes in the case statement but not sure what. I am still trying to get more familiar with Melb23's CFF UDF so I can figure out how to implement this form in it. I am working through ChooseFileFolder_Example_2.au3 as that uses the GUI created outside the main script. Now I need to have both trees active with that UDF as I need to multi select from the source tree and single select from the destination tree and or create a directory. This is going to be a long project unlike the other one which got completed fairly quickly. GUI's really add a lot of stuff to a project. I did see a Youtube video on it may have to go back and watch that to figure out the button click events. I'll get this. Some hints from the gallery may not be bad.