Sign in to follow this  
Followers 0
GianAutoitprogrammer

How to list files in a directory using a listbox?

3 posts in this topic

Hellow Its me again

I just want to create a quarantine browser in autoit using a listbox i mean how to list files

in a directory using autoit...

Here is my GUI Code:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Quarantine Browser", 623, 356, 192, 124)
$List1 = GUICtrlCreateList("", 8, 8, 601, 279)
$Button1 = GUICtrlCreateButton("Restore Selected", 8, 296, 97, 41)
$Button2 = GUICtrlCreateButton("Refresh", 120, 296, 97, 41)

GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
                Case $button1
;restore selected
                Case $button2
;list all the virus files

    EndSwitch
WEnd

I know how to do it in VB.net but I dont know how to do it in autoit...

:unsure::>

Share this post


Link to post
Share on other sites



Hellow Its me again

I just want to create a quarantine browser in autoit using a listbox i mean how to list files

in a directory using autoit...

Here is my GUI Code:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Quarantine Browser", 623, 356, 192, 124)
$List1 = GUICtrlCreateList("", 8, 8, 601, 279)
$Button1 = GUICtrlCreateButton("Restore Selected", 8, 296, 97, 41)
$Button2 = GUICtrlCreateButton("Refresh", 120, 296, 97, 41)

GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
                Case $button1
;restore selected
                Case $button2
;list all the virus files

    EndSwitch
WEnd

I know how to do it in VB.net but I dont know how to do it in autoit...

:>;)

Hi GianAutoitprogrammer

Did you try using _FileListtoArray or FileFindFirstFile or FileFindNextFile ?

:unsure:


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites

ok I will try it :unsure:

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