jercfd 0 Posted February 3, 2008 Share Posted February 3, 2008 how do i make a FileOpenDialog command send the file path to a GUICtrlCreateInput text box? While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Browse1 $path1 = FileOpenDialog("Select a file", @WorkingDir & "", "FLV Files (*.flv)", 1 + 2 ) If @error Then MsgBox(4096,"Error","No File chosen") Else $var = StringReplace($path1, "|", @CRLF) MsgBox(4096,"File Choosen","You have selected " & $path1) EndIf EndSwitch WEnd Link to post Share on other sites
jercfd 0 Posted February 3, 2008 Author Share Posted February 3, 2008 (edited) updated code While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Browse1 $path1 = FileOpenDialog("Select a file", @WorkingDir & "", "FLV Files (*.flv)", 1 + 2 ) If @error Then MsgBox(4096,"Error","No File chosen") Else $path1 = StringReplace($path1, "|", @CRLF) MsgBox(4096,"File Choosen","You have selected " & $path1) $Input1 = $path1 EndIf EndSwitch WEnd Edited February 3, 2008 by jercfd Link to post Share on other sites
PsaltyDS 46 Posted February 3, 2008 Share Posted February 3, 2008 updated code While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Browse1 $path1 = FileOpenDialog("Select a file", @WorkingDir & "", "FLV Files (*.flv)", 1 + 2 ) If @error Then MsgBox(4096,"Error","No File chosen") Else $path1 = StringReplace($path1, "|", @CRLF) MsgBox(4096,"File Choosen","You have selected " & $path1) $Input1 = $path1 EndIf EndSwitch WEnd You seem to intend to work with multi-line data, so you should be putting it in an Edit control vice and Input, but the methods are the same either way: GuiCtrlSetData() or ControlSetText() 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 Link to post Share on other sites
jercfd 0 Posted February 3, 2008 Author Share Posted February 3, 2008 You seem to intend to work with multi-line data, so you should be putting it in an Edit control vice and Input, but the methods are the same either way: GuiCtrlSetData() or ControlSetText() Thanks, It now works. Thanks for the help. Link to post Share on other sites
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