Jump to content

FileOpenDailog


Riz
 Share

Recommended Posts

  • Moderators

Actually, I just think we are all confused on what you want. What's wrong with FileOpenDialog?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Actually, I just think we are all confused on what you want. What's wrong with FileOpenDialog?

Sorry, if my question not clear. I just want smaller window instead that MS window.

Link to comment
Share on other sites

You could use InputBox("Enter a filename").

Thanks for your reply.

I have tried a lot of method but I couldnt figure out.

1- Get files from specific folder into $Input_1

2- When the file selected press $Button_2 to open

#include <GuiConstants.au3>

GuiCreate("MyGUI", 213, 271,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Input_1 = GuiCtrlCreateInput("", 10, 10, 190, 220)
$Button_2 = GuiCtrlCreateButton("Open", 50, 240, 110, 20)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    
    Case Else
    ;;;
    EndSelect
WEnd
Exit
Link to comment
Share on other sites

Hi,

just an idea :D

#include <GuiConstants.au3>
#include <GuiListView.au3>
#Include <File.au3>
#Include <Array.au3>

$path = InputBox("Choose destination", "Path : ", "c:\")

$FileList = _FileListToArray($path)
If (Not IsArray($FileList)) and (@error = 1) Then
    MsgBox(0, "", "No Files\Folders Found.")
    Exit
EndIf

Global $listviewItems[$FileList[0] + 1]
GUICreate("ListView Scroll", 392, 322)
$listview = GUICtrlCreateListView("Number| File/FolderName", 40, 30, 310, 149)
For $i = 1 To UBound($FileList) - 1
    $listviewItems[$i] = GUICtrlCreateListViewItem($i & "|" & $FileList[$i], $listview)
Next
$Btn_Exit = GUICtrlCreateButton("Exit", 300, 260, 70, 30)
$Btn_Run = GUICtrlCreateButton("Run ", 300, 220, 70, 30)

GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE Or $msg = $Btn_Exit
            ExitLoop
        Case $msg = $Btn_Run
            RunWait(@ComSpec & ' /c start ' & $path & _GUICtrlListViewGetItemText($listview, _GUICtrlListViewGetCurSel($listview), 1), '', @SW_HIDE)
            
    EndSelect
WEnd
Exit

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Hi,

just an idea :wacko:

#include <GuiConstants.au3>
#include <GuiListView.au3>
#Include <File.au3>
#Include <Array.au3>

$path = InputBox("Choose destination", "Path : ", "c:\")

$FileList = _FileListToArray($path)
If (Not IsArray($FileList)) and (@error = 1) Then
    MsgBox(0, "", "No Files\Folders Found.")
    Exit
EndIf

Global $listviewItems[$FileList[0] + 1]
GUICreate("ListView Scroll", 392, 322)
$listview = GUICtrlCreateListView("Number| File/FolderName", 40, 30, 310, 149)
For $i = 1 To UBound($FileList) - 1
    $listviewItems[$i] = GUICtrlCreateListViewItem($i & "|" & $FileList[$i], $listview)
Next
$Btn_Exit = GUICtrlCreateButton("Exit", 300, 260, 70, 30)
$Btn_Run = GUICtrlCreateButton("Run ", 300, 220, 70, 30)

GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE Or $msg = $Btn_Exit
            ExitLoop
        Case $msg = $Btn_Run
            RunWait(@ComSpec & ' /c start ' & $path & _GUICtrlListViewGetItemText($listview, _GUICtrlListViewGetCurSel($listview), 1), '', @SW_HIDE)
            
    EndSelect
WEnd
Exit

So long,

Mega

Im sorry, I havent chance to look at your help before. I just seen it Its amazing :D

I couldn't find any word at the moment to tell you for your help, thank you very very very mach

Link to comment
Share on other sites

Im sorry, I havent chance to look at your help before. I just seen it Its amazing :D

I couldn't find any word at the moment to tell you for your help, thank you very very very mach

Wow, are you joking? :wacko: Well if not, thanks. Glad that I could help.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...