Sign in to follow this  
Followers 0
jercfd

write to textbox

4 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by jercfd

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

:)

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