Sign in to follow this  
Followers 0
igmeou

Do a browse button

3 posts in this topic

Can I know how to do a browse button like show in the picture attach that will return the path to an inputbox? :D

I would like to create a button that will return the path and filename to my inputbox so that the inputbox will contain the path and filename I am going to save my documents to. :)

It will be behaving something like a SaveAs dialog box, which will pop up a dialog for me to browse to the destination for my file and of course return the destination path and filename to my inputbox. :D

Anyone have an idea of how to do this? :huh:


[font="Arial"]Thanks[/font]
If @error = me Then $sorry
Else
   Do
      $clarifyMe
   Until $meClear
EndIF
MsgBox(0,"Special Message!","Special Thanks to " & $allHadReplied,$Forever)

Share this post


Link to post
Share on other sites



Hello,

Is it what you are witing for ?

#include <GuiConstants.au3>

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GuiCreate("Browse", 390, 316,(@DesktopWidth-390)/2, (@DesktopHeight-316)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$Button_1 = GuiCtrlCreateButton("Browse ...", 100, 100, 80, 20)
$Input_2 = GuiCtrlCreateInput("", 90, 50, 210, 20)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg=$Button_1
        $filetosave=FileSaveDialog("Save","","(*.*)",8)
        if @error<>1 then GUICtrlSetData($Input_2,$filetosave)
    Case Else
    ;;;
    EndSelect
WEnd
Exit

Share this post


Link to post
Share on other sites

Thats It. :huh: You read my mind. :):D:D


[font="Arial"]Thanks[/font]
If @error = me Then $sorry
Else
   Do
      $clarifyMe
   Until $meClear
EndIF
MsgBox(0,"Special Message!","Special Thanks to " & $allHadReplied,$Forever)

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