pingpong24 Posted January 22, 2006 Posted January 22, 2006 I want update my GUI with a string that contains @CRLF and other charecter of that sort $data = something something else something something else GUICtrlSetData(controlname, $data) note that data part is just an example, i am just demonstrating @crlf etc. NumCR Super Fast EASY NUMBER OCR, easiest and the fastest AUTOIT OCR released on this forum
ACalcutt Posted January 22, 2006 Posted January 22, 2006 (edited) I want update my GUI with a string that contains @CRLF and other charecter of that sort $data = something something else something something else GUICtrlSetData(controlname, $data) note that data part is just an example, i am just demonstrating @crlf etc. GUICtrlSetData(controlname, $data & @CRLF) this will deleted previous data(at least in edit boxes) GUICtrlSetData(controlname, $data & @CRLF, 1) this adds to the current data(at least in edit boxes) GUICtrlSetData(controlname, $data & @CRLF & $data2) and just to mention..your missing quotes on the first line...and the second line would cause an error Edited January 22, 2006 by ACalcutt Andrew Calcutt Http://www.Vistumbler.net Http://www.TechIdiots.net Its not an error, its a undocumented feature
pingpong24 Posted January 22, 2006 Author Posted January 22, 2006 (edited) sorry if pharsed it incorrectly, the current string consists of writing and spaces (@CRLF and @CR etc) i dont want that too be striped out, i want that all to be shown. Preferable shown @CRLF instead of white space in my GUI box. how do i do this. (please show both method, with @crlf and with white spaces) Edited January 22, 2006 by pingpong24 NumCR Super Fast EASY NUMBER OCR, easiest and the fastest AUTOIT OCR released on this forum
ACalcutt Posted January 22, 2006 Posted January 22, 2006 (edited) sorry if pharsed it incorrectly, the current string consists of writing and spaces (@CRLF and @CR etc) i dont want that too be striped out, i want that all to be shown.Preferable shown @CRLF instead of white space in my GUI box.how do i do this.(please show both method, with @crlf and with white spaces)did you try putting it in quotes? you may run into problems with the @...but something like Chr(64) & "CRLF" should workbothmsgbox(0, "", Chr(64) & "CRLF")andmsgbox(0, "", "@CRLF")displayed @CRLF......what kind of control is this going into? Edited January 22, 2006 by ACalcutt Andrew Calcutt Http://www.Vistumbler.net Http://www.TechIdiots.net Its not an error, its a undocumented feature
ACalcutt Posted January 22, 2006 Posted January 22, 2006 (edited) something like this? GuiCreate("MyGUI", 236, 172) $Edit_1 = GuiCtrlCreateEdit("Edit1", 10, 20, 210, 140) GuiSetState() While 1 GUICtrlSetData($Edit_1, '$data = "something something else"' & @CRLF & '"something something else"' & @CRLF & "@CRLF" & @CRLF & 'GUICtrlSetData(controlname, $data)') Sleep(5000) WEnd Exit or GuiCreate("MyGUI", 236, 172) $Edit_1 = GuiCtrlCreateEdit("Edit1", 10, 20, 210, 140) GuiSetState() While 1 GUICtrlSetData($Edit_1, '$data = "something" & @CRLF & "something else"' & @CRLF & '"something something else"' & @CRLF & "@CRLF" & @CRLF & 'GUICtrlSetData(controlname, $data)') Sleep(5000) WEnd Exit keep in mind to show a " you have to either use double quotes like " something ""something"" " or use single quotes on the outside like ' something "something" ' Edited January 23, 2006 by ACalcutt Andrew Calcutt Http://www.Vistumbler.net Http://www.TechIdiots.net Its not an error, its a undocumented feature
pingpong24 Posted January 23, 2006 Author Posted January 23, 2006 thanks for trying to help me, but non of your examples helped as what you are doing is trying to put a basic @crlf etc into a string.. i dont want that i can do that thats very easy. I geting a raw data from another program and placing it into an STRING. so the raw data: ijsglja gskjgal jgasgjlajgkaj <BR><BR> sgkashgska jhgashga $string = raw_data now from that raw data, i want to put that into a control, preferably showing all @CRLF etc. GUICtrlSetData($input9, $recivied) at the moment, when i input that data from $recived to the control it strips all Carge return.. so all @CR are removed... the ideal solution for me, is to get the RAW data, directly to the control so all @CRLF and @CR should be displayed. many thanks. NumCR Super Fast EASY NUMBER OCR, easiest and the fastest AUTOIT OCR released on this forum
pingpong24 Posted January 23, 2006 Author Posted January 23, 2006 the control is a textbox, and i have just tried $sgasga = StringAddCR($recivied) and sending $sgasga... but instead of @CR @CLF.. only thing that comes out is the plain text with white spaces.. NumCR Super Fast EASY NUMBER OCR, easiest and the fastest AUTOIT OCR released on this forum
seandisanti Posted January 23, 2006 Posted January 23, 2006 the control is a textbox, and i have just tried $sgasga = StringAddCR($recivied)and sending $sgasga... but instead of @CR @CLF.. only thing that comes out is the plain text with white spaces..is your edit box created as multi-line? if you show actual code, it may be more clear what you're trying to do.
pingpong24 Posted January 23, 2006 Author Posted January 23, 2006 expandcollapse popup#include <GUIConstants.au3> $Form5 = GUICreate("Bit Cheater - Bittorrent Tracker Stat Cheater V0.01") $Get = GUICtrlCreateButton("Get",100,120,89,33) $Input14 = GUICtrlCreateInput("", 224, 176, 273, 21, -1, $WS_EX_CLIENTEDGE) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $Get listen() EndSelect WEnd Func listen() TCPStartup() $MainSocket = TCPlisten("127.0.0.1", "6969") If $MainSocket = -1 Then MsgBox(16, "Error", "The port 6969 is being used") Exit EndIf $recivied = "" While $recivied = "" $ACCEPT = TCPAccept($MainSocket) If $ACCEPT >= 0 Then While $recivied = "" $recivied = TCPRecv($ACCEPT, "800000") WEnd GUICtrlSetData($input9, $recivied) ;$dugole = StringAddCR($recivied) ;MsgBox(0,"",$recivied) ;MsgBox(0,"",$dugole) EndIf WEnd TCPShutdown() EndFuncoky this is the code.i modified the GUI to just include the two things that this part requires.take a look.here is an example verable $recived would get[start] $recivied = POST http://www.gsjghskhgksagkhsgjkshdghasg.com/ffafa.asp HTTP1.1 UserAgent = ......Someelse = ........[end]now what i want it to do is:[start] $recovoed = POST@CRLFhttp://www............com/ffaf.asp@CRLFHTTP1.1@CRUserAgent=....@CRSomeelse[end] NumCR Super Fast EASY NUMBER OCR, easiest and the fastest AUTOIT OCR released on this forum
seandisanti Posted January 23, 2006 Posted January 23, 2006 ok... so by your code, you're trying to forcefeed a multi-line value into a single line input? won't fit.
pingpong24 Posted January 24, 2006 Author Posted January 24, 2006 So how do i make a multi lined text box or something else that a user can copy or modify? NumCR Super Fast EASY NUMBER OCR, easiest and the fastest AUTOIT OCR released on this forum
seandisanti Posted January 24, 2006 Posted January 24, 2006 So how do i make a multi lined text box or something else that a user can copy or modify?use the optional 'style' parameter to explicitly declare the control as multi-line$ES_MULTILINE 0x0004 Designates a multiline edit control. The default is a single-line edit control. you will probably want to add the $ES_AUTOVSCROLL and $ES_AUTOHSCROLL to remove the scroll bars from the control also. if you're going to use more than one style; join the styles with BitOr(style1,style2,style3)
pingpong24 Posted January 29, 2006 Author Posted January 29, 2006 btw thanks it worked. I realised why my own attempts to solove this problem didnt work.. i was trying stuff on the wrong GUI control hehe. NumCR Super Fast EASY NUMBER OCR, easiest and the fastest AUTOIT OCR released on this forum
seandisanti Posted January 31, 2006 Posted January 31, 2006 btw thanks it worked. I realised why my own attempts to solove this problem didnt work.. i was trying stuff on the wrong GUI control hehe.np, glad to help
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