Glyph Posted January 24, 2007 Share Posted January 24, 2007 (edited) #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) $cont1=GUICtrlCreateEdit("Planning to add seperate gui for date searching, as well as a bettrr gui, this is only a test!",10,10,700,500,1) $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 GUICtrlSetData($cont1,"omg hacks", "text update") MsgBox(0,"First test","Whisper") EndIf If BitAnd(GUICtrlRead($n2),$GUI_CHECKED) = $GUI_CHECKED Then GUICtrlSetData($cont1,"omg hacks", "text update") MsgBox(0,"Second test","Chat") EndIf Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd i just want everything behind to dissapear and have "omg hacks" to appear in its place. note: _GUICtrlEditReplaceSel does not work! Edited January 25, 2007 by backstabbed tolle indicium Link to comment Share on other sites More sharing options...
Glyph Posted January 25, 2007 Author Share Posted January 25, 2007 Heres what i did to fix: GUICtrlDelete($cont1) $cont2=GUICtrlCreateEdit("",10,10,700,500,1) GUICtrlSetData($cont2,"omg hacks", "text update") tolle indicium Link to comment Share on other sites More sharing options...
Helge Posted January 25, 2007 Share Posted January 25, 2007 Ok, let me see if I got this one right... Do you want it so that when the user has checked the checkboxesand presses the button, the current text is cleared and it's set to "omg hacks" instead ? Well, if so, why onearth do you have the last parameter set to a non-blank value ? It's pretty clear in the helpfile that the textthen is inserted instead of replacing the text...for Edit, Input : if defined and not "" the "data" string is inserted not overriding the previous value at the caret point.Recreating the edit-control is a pretty weird way of doing it, and I hope you weren't seriously thinking thatthis was the only or best way of solving it. Link to comment Share on other sites More sharing options...
Glyph Posted January 25, 2007 Author Share Posted January 25, 2007 It's teh easiest tolle indicium Link to comment Share on other sites More sharing options...
Helge Posted January 25, 2007 Share Posted January 25, 2007 Maybe on your planet, but on mine it's more retarded, has more lines and it's not too funky either. GUICtrlSetData($cont1,"omg hacks")oÝ÷ ÚûºÚ"µÍÕRPÝ[]J ÌÍØÛÛJBÌÍØÛÛQÕRPÝÜX]QY] ][ÝÉ][ÝËLL Ì LJBÕRPÝÙ]]J ÌÍØÛÛ ][ÝÛÛYÈXÚÜÉ][ÝË ][ÝÝ^]I][ÝÊ Hell yeah, that's teh easiest alright. Link to comment Share on other sites More sharing options...
improbability_paradox Posted January 25, 2007 Share Posted January 25, 2007 GUICtrlSetData($cont1,"") GUICtrlSetData($cont1,"omg hacks") Clear the data first, by sending a blank string "" Set the new data simple as that. (and yes, it does explain this in the helpfile too...) Link to comment Share on other sites More sharing options...
Helge Posted January 25, 2007 Share Posted January 25, 2007 GUICtrlSetData($cont1,"") GUICtrlSetData($cont1,"omg hacks") Clear the data first, by sending a blank string "" Set the new data simple as that. (and yes, it does explain this in the helpfile too...)Why clear it in the first and replace nothing with "omg hacks" in the second, when you can just replace it immediately in the first GUICtrlSetData, as I showed in my previous post. Hey, would you look at that.. This is also explained in the helpfile ! Link to comment Share on other sites More sharing options...
improbability_paradox Posted January 25, 2007 Share Posted January 25, 2007 (edited) Why clear it in the first and replace nothing with "omg hacks" in the second, when you can just replaceit immediately in the first GUICtrlSetData, as I showed in my previous post. Hey, would you look at that..This is also explained in the helpfile !your correct, what I was trying to show was how to clear it, thats all. I wasn't saying that you didn't have knowledge of what was expressly stated in the helpfile, Helge, I was just expressing a concept in a different way (the helpfile comment was directed at the OP, anyhow). The title of the thread is "Completely erase a guictrledit window?", and then in the first thread the OP explains that he wants it erased, and then to have something new inserted in its place. I was doing it step-by-step so that he could erase it and leave it blank, if he wanted to. At the time of my posting you had already shown how to replace the content, I wanted to show how to blank it out. Simple concept, but the OP might not have realized it otherwise. Edited January 25, 2007 by improbability_paradox Link to comment Share on other sites More sharing options...
Helge Posted January 25, 2007 Share Posted January 25, 2007 Yeah, I see improb, but you got to look at the guy on the other side as well and his methods used... When they want to update or replace the text of a control and they go on and solves it by recreating the control like that....well, then I do my own thinking instead of looking at what's said and suggested in the way the question is given. 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