erikson Posted March 12, 2007 Posted March 12, 2007 (edited) hi codemasters i what to create a gui, with 2 input text , and with 2 Browse directory buttons. and one Ok button , i whant after i choose the directory, the path of the directory i choose to be send to the input field ( for example if i choose c:\temp\names folder, the " c:\temp\names " appear in the input field. can anybody help me? LE i atach some code to be more specific CODE #include <GuiConstants.au3> GuiCreate("Choose", 362, 258,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Input_1 = GuiCtrlCreateInput("Input1", 20, 50, 190, 30) $Input_2 = GuiCtrlCreateInput("Input2", 20, 120, 190, 30) $Button_3 = GuiCtrlCreateButton("Browse source", 240, 50, 100, 30) $Button_4 = GuiCtrlCreateButton("Browse destination", 240, 120, 100, 30) $Button_5 = GuiCtrlCreateButton("next", 70, 180, 110, 40) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_3 $home = FileSelectFolder("Please Select the home folder", "") Case $msg = $Button_4 $dest = FileSelectFolder("Please select the dest folder","") Case $msg = $Button_5 DirMove ($home, $dest) EndSelect WEnd Exit Edited March 12, 2007 by erikson
BigDod Posted March 12, 2007 Posted March 12, 2007 Does this work for you #include <GuiConstants.au3> GuiCreate("Choose", 362, 258,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Input_1 = GuiCtrlCreateInput("Input1", 20, 50, 190, 30) $Input_2 = GuiCtrlCreateInput("Input2", 20, 120, 190, 30) $Button_3 = GuiCtrlCreateButton("Browse source", 240, 50, 100, 30) $Button_4 = GuiCtrlCreateButton("Browse destination", 240, 120, 100, 30) $Button_5 = GuiCtrlCreateButton("next", 70, 180, 110, 40) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_3 $home = FileSelectFolder("Please Select the home folder", "") GUICtrlSetData($Input_1,$home) Case $msg = $Button_4 $dest = FileSelectFolder("Please select the dest folder","") GUICtrlSetData($Input_2,$dest) Case $msg = $Button_5 DirMove ($home, $dest) 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
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