Roshan Posted February 20, 2016 Share Posted February 20, 2016 Hi ! I am new for forum & need little bit help from other users. I trying to get data from edit box by using this command. $stringToSend = GUICtrlRead($Edit1) This command get complete data of edit box. I want to get data from edit box line by line . How can i do this? Thanks Roshan $stringToSend = GUICtrlRead($Edit1) Link to comment Share on other sites More sharing options...
InunoTaishou Posted February 20, 2016 Share Posted February 20, 2016 (edited) #include <GUIConstantsEx.au3> #include <GuiEdit.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local $idEdit Local $sWow64 = "" If @AutoItX64 Then $sWow64 = "\Wow6432Node" Local $sFile = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE" & $sWow64 & "\AutoIt v3\AutoIt", "InstallDir") & "\include\_ReadMe_.txt" ; Create GUI GUICreate("Edit Get Line", 400, 300) $idEdit = GUICtrlCreateEdit("", 2, 2, 394, 268) GUISetState(@SW_SHOW) _GUICtrlEdit_SetText($idEdit, FileRead($sFile)) MsgBox($MB_SYSTEMMODAL, "Information", _GUICtrlEdit_GetLine($idEdit, 2)) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example Note the _GUICtrlEdit_GetLine($idEdit, 2)) This was copied and pasted directly from the Help File. Edited February 20, 2016 by InunoTaishou Roshan 1 Link to comment Share on other sites More sharing options...
Roshan Posted February 20, 2016 Author Share Posted February 20, 2016 Dear Sir, Thanks. It works perfect. I could not find below command in help file , as you mentioned in your sample program. _GUICtrlEdit_GetLine($idEdit, 2) Now it works perfect. Thanks Again. roshan Link to comment Share on other sites More sharing options...
Mo0C0w Posted July 28, 2021 Share Posted July 28, 2021 I know this is a pretty old topic, but when you said $stringToSend = GUICtrlRead($Edit1), was that able to look though everything in the editbox? Outcome I am wanting Paste a lot of names into the editbox based on the names that are found in the editbox I want to run a function for each name. As of now I can only get it to read the first name and if there is anything else in the editbox it will not do anything. Link to comment Share on other sites More sharing options...
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