Jump to content

GUICtrlSetData with @ CRLF


Recommended Posts

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.

Link to comment
Share on other sites

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 by ACalcutt

Andrew Calcutt

Http://www.Vistumbler.net

Http://www.TechIdiots.net

Its not an error, its a undocumented feature

Link to comment
Share on other sites

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 by pingpong24
Link to comment
Share on other sites

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 work

both

msgbox(0, "", Chr(64) & "CRLF")

and

msgbox(0, "", "@CRLF")

displayed @CRLF......what kind of control is this going into?

Edited by ACalcutt

Andrew Calcutt

Http://www.Vistumbler.net

Http://www.TechIdiots.net

Its not an error, its a undocumented feature

Link to comment
Share on other sites

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 by ACalcutt

Andrew Calcutt

Http://www.Vistumbler.net

Http://www.TechIdiots.net

Its not an error, its a undocumented feature

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

#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()
EndFunc

oky 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]

Link to comment
Share on other sites

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)

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