Sign in to follow this  
Followers 0
jdefed

Shellexecute script

3 posts in this topic

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.

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by jdefed

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0