sd333221 Posted December 8, 2005 Posted December 8, 2005 (edited) Hi, in my GUI, i need a button "Choose File", and when you klick it a little window pops up, where you can choose a file... Would be great if you could help me =) thank you alot! PS: Is there a way to do this with "KODA"? Edited December 8, 2005 by sd333221
BigDod Posted December 8, 2005 Posted December 8, 2005 Hi, in my GUI, i need a button "Choose File", and when you klick it a little window pops up, where you can choose a file... Would be great if you could help me =) thank you alot! PS: Is there a way to do this with "KODA"?Here is an example part made with Koda but not the file select part #include <GUIConstants.au3> $message = "Hold down Ctrl or Shift to choose multiple files." $Form1 = GUICreate("AForm1", 622, 448, 192, 125) $Button1 = GUICtrlCreateButton("Choose File", 80, 40, 81, 25) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 $var = FileOpenDialog($message, "C:\Windows\", "Images (*.jpg;*.bmp)", 1 + 4 ) MsgBox(4096,"","You chose " & $var) Case Else ;;;;;;; EndSelect WEnd Exit Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
Moderators SmOke_N Posted December 8, 2005 Moderators Posted December 8, 2005 (edited) Yes with Koda, and check out FileOpenDialog(). Edit: Or someone could just write it for you again.... Edited December 8, 2005 by SmOke_N 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.
sd333221 Posted December 8, 2005 Author Posted December 8, 2005 Yes with Koda, and check out FileOpenDialog().Edit:Or someone could just write it for you again....Ok thank you =) i am now confrontated with the problem, how i can displaythe chosen file in a disabled input box, but i think i can get that workin
Moderators SmOke_N Posted December 8, 2005 Moderators Posted December 8, 2005 Look at GUICtrlSetData(), you'll need to make the input box a variable. 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.
sd333221 Posted December 8, 2005 Author Posted December 8, 2005 Ok, thank you alot. My GUI is now gone. Now i have to link all the hundreds of GUI bars, buttons and input boxes to my main programm -__-. I think I do this tomorrow ^^ Thank you two alot for your help. Always very fast on the forums greetings
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