Sign in to follow this  
Followers 0
Glyph

Replacing text in GUI text box how?

8 posts in this topic

#include <GUIConstants.au3>
;------------------------------------Variables!-------------------------
$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)
GUISetState(@SW_SHOW)

;------------------------------------Structure!-------------------------
While 1
    $msg = GUIGetMsg()
    Select
  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")
EndIf
   If BitAnd(GUICtrlRead($n2),$GUI_CHECKED) = $GUI_CHECKED Then
;How do i change the edit box's text here?
MsgBox(0,"second test","Chat")
   EndIf
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
            
    EndSelect
WEnd

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

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

I'm afraid i don't understand?

---edit--the link after edit helped.

Edited by backstabbed

tolle indicium

Share this post


Link to post
Share on other sites

Anyone know the controlID for an EDIT?


tolle indicium

Share this post


Link to post
Share on other sites

Anyone know the controlID for an EDIT?

On your GUI... the Control ID is created with

$ControlID = GUICtrlCreateEdit()

On an Out-side program ( not created by you ), Use Autoit Window Info Tool

8)


NEWHeader1.png

Share this post


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

Share this post


Link to post
Share on other sites

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.

Example:

$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)


[center]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.[/center]

Share this post


Link to post
Share on other sites

Wow, thank you... it makes so much sense now!, and i added that extra stufff sorry for that confusion Oo.


tolle indicium

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