Sign in to follow this  
Followers 0
cdkid

GuiCtrlCreateFile?

5 posts in this topic

well, you know how in HTML you can use <input type="file"> etc, well is there a way to make a file input or would it just be easier to link a button that opens a file open dialog & a text control?

--just wondering

~cdkid


AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

Share this post


Link to post
Share on other sites



well, you know how in HTML you can use <input type="file"> etc, well is there a way to make a file input or would it just be easier to link a button that opens a file open dialog & a text control?

--just wondering

~cdkid

You don't just mean an input box that will accept a paste for the file path/name? Or do you mean like the FileOpenDialog() function as a GUI control?

:o


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

i mean a control that looks like

[iNPUTBOX] [bUTTON]

then u can either put in a file in the inputbox or hit the button and it opens a fileopendialog... i could just write the button and inputbox seperately and link em, but i was just wondering if there's already something like it

~cdkid


AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

Share this post


Link to post
Share on other sites

i mean a control that looks like

[iNPUTBOX] [bUTTON]

then u can either put in a file in the inputbox or hit the button and it opens a fileopendialog... i could just write the button and inputbox seperately and link em, but i was just wondering if there's already something like it

~cdkid

I think I've seen the kind of control you're talking about in the wild, but I'll bet they're not a single control in the code. Here's my shot at the kind I've seen:

#include <GuiConstants.au3>

$Gui_1 = GUICreate("Input Test", 300, 110, -1, -1, -1, $WS_EX_ACCEPTFILES)
GUICtrlCreateLabel("Enter or select the file:", 10, 10, 280, 20, $SS_Center)
$Input_1 = GUICtrlCreateInput("", 10, 40, 250, 20)
$Button_1 = GUICtrlCreateButton("...", 270, 40, 20, 20)
$Button_2 = GUICtrlCreateButton("OK", 120, 70, 60, 30)
GUISetState(@SW_SHOW, $Gui_1)

While (1)
    $GuiMsg = GUIGetMsg()
    Select
        Case $GuiMsg = $GUI_EVENT_CLOSE
            Exit
        Case $GuiMsg = $Button_1
            $SelFile = FileOpenDialog("Select File", "", "All Files(*.*)", 1)
            If Not @error Then GUICtrlSetData($Input_1, $SelFile)
        Case $GuiMsg = $Button_2
            $SelFile = GUICtrlRead($Input_1)
            ExitLoop
    EndSelect
WEnd

GUIDelete($Gui_1)

MsgBox(64, "Input Test", "Selected File: " & $SelFile)

Cheers! :o


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

many thanks

:geek:

:o

attack of the emoticons?

i think not

--thanks again

~cdkid


AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

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