Jump to content

Replacing text in GUI text box how?

Recommended Posts

#include <GUIConstants.au3>
$date = InputBox("Input Date","Current date setter for the time being.")
$hexbk = IniRead(@ScriptDir&"\Settings.ini","Background","0","0x666666")
$sbdir = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\StealthBot v2.6 Revision 3", "Install_Dir")
$weee=GuiCreate("SB Log Reader v0.1", 750, 550)
$e1=GUICtrlCreateEdit("Planning to add seperate gui for date searching, as well as a bettrr gui, this is only a test!",10,10,700,500)
$n1=GUICtrlCreateCheckbox ("Check whispers log",10,520)
$n2=GUICtrlCreateCheckbox ("Check chat log",120,520)
$okbtn = GUICtrlCreateButton("&Update", 620, 520, 80, 25, 0)

GUISetBkColor ($Hexbk)

While 1
    $msg = GUIGetMsg()
  Case $msg = $okbtn
   If BitAnd(GUICtrlRead($n1),$GUI_CHECKED) = $GUI_CHECKED Then
;How do i change the edit box's text here?
MsgBox(0,"First test","Whisper")
   If BitAnd(GUICtrlRead($n2),$GUI_CHECKED) = $GUI_CHECKED Then
;How do i change the edit box's text here?
MsgBox(0,"second test","Chat")
        Case $msg = $GUI_EVENT_CLOSE

The commented line is where i'de like to add it.. i can't seem to find a command that replaces the text in wich i have to the text i need, the txt file.

tolle indicium

Link to post
Share on other sites

You have no idea how confused i am, lol.... heres what im reading,,,

" GUICtrlSetData


Modifies the data for a control.

GUICtrlSetData ( controlID, $variable, text update )"

and i'm pretty much lost...

tolle indicium

Link to post
Share on other sites
  • Moderators

1. I have no idea where you are getting your info from... the parameters for GUICtrlSetData

GUICtrlSetData ( controlID, data [, default])

ControlID = The Control you want to interact with.


$Control1 = GUICtrlCreateEdit(...)

$Control1 holds our Control ID.

Data .... This doesn't have to be a variable, it can be a string / number whatever... This is what you want to fill the Control with.

Default ... If you are doing a Combobox, you can set what the default will be that shows up automatically before scrolling (must match something in the sting of Data that you are changing)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...