Jump to content

Get data from edit box line by line


Recommended Posts

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 post
Share on other sites
#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 by InunoTaishou
Link to post
Share on other sites
  • 5 years later...

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 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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...