Jump to content

Need help with Edit box in GUI


Recommended Posts

Hi, im having a problem reading every line in Edit Box.

Here is source:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>

Global $Form1 = GUICreate("Part of AoB generator", 298, 332, 192, 124)
Global $text = GUICtrlCreateEdit("", 0, 0, 297, 257)
Global $Button1 = GUICtrlCreateButton("Generate", 8, 264, 75, 25, $WS_GROUP)
Global $Input1 = GUICtrlCreateInput("", 8, 304, 281, 21)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1

            
    EndSwitch
WEnd

What i want is read lines from GUI Edit that has "//" in front, and add those lines to Input without a beginning of "//", and do this with every line in Edit.

For example:

"blah blah blah"

// text1

"blah blah blah"

// text2

"blah blah blah"

should give text1 text2

Any suggestions? :/

Edited by chemboy
Link to comment
Share on other sites

Right now, all you have is a gui, have you attempted anything at all?

All to often you get a string of replies only for the OP to proclaim they "tried all those suggestions first and they didnt work"

If you have not tried anything, first thing you need is GUICtrlRead() <- help file and look at stringsplit()/_stringexplode(), and stringinstr() to get you started.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...