jdefed Posted April 19, 2010 Share Posted April 19, 2010 I have a simple script Shellexecute("D:\Recorded Shows"), which shows all of the files in my folder. Is there an alternative function that I could use to accomplish the same end result? I do not want the window to look like a Windows XP window. I will be continuing from that point with more commands. Link to comment Share on other sites More sharing options...
Spiff59 Posted April 19, 2010 Share Posted April 19, 2010 You could look at the FileOpenDialog()function in the helpfile, or play with something like this: #include <file.au3> #include <GUIListView.au3> $aFileList= _FileListToArray("C:\Program Files") GUICreate("", 240, 200) $listview = GUICtrlCreateListView("FILES", 10, 10, 220, 172, -1, $LVS_EX_CHECKBOXES) _GUICtrlListView_SetColumnWidth ($listview, 0, 203) For $i = 1 to $aFileList[0] GUICtrlCreateListViewItem($aFileList[$i], $listview) Next GUISetState() ; Main loop While 1 If GUIGetMsg() = -3 Then ExitLoop WEnd Link to comment Share on other sites More sharing options...
jdefed Posted April 22, 2010 Author Share Posted April 22, 2010 (edited) This looks like what I want to accomplish. I was able to make a few changes that I could figure out, but need some more guidance. I would like to insert the computer day and time that shows in the lower right corner of the screen, somewhere above the "recorded shows" text. The files that are listed are going to be constantly changing and I want to insert a column that shows the date it was created. I was thinking of "Filegettime", but that would need the name of the file(which I wouldn't know because it would change). Ideally I would just show the date from the file itself in the windows folder. I removed the checkbox from the column and inserted subitemimages, because I will be selecting a file and then opening a msgbox for more commands(play or delete). Was that a correct thing to do? I have attached the script and hope I did it right. #include <file.au3> #include <GUIListView.au3> $aFileList= _FileListToArray("d:\recorded shows") GUICreate("", 800, 600) GUISetFont(20) $listview = GUICtrlCreateListView("Recorded Shows", 10, 10, 300, 580, -1, $LVS_EX_SUBITEMIMAGES) _GUICtrlListView_SetColumnWidth ($listview, 0, 300) For $i = 1 to $aFileList[0] GUICtrlCreateListViewItem($aFileList[$i], $listview) Next GUISetState() ; Main loop While 1 If GUIGetMsg() = -3 Then ExitLoop WEnd test2A.au3 Edited April 22, 2010 by jdefed Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now