Jump to content

FF.au3 The problem with textarea


Recommended Posts

I have a code page:

<textarea cols="80" name="strMessage" rows="12"></textarea>

This code complements the field "value" in the textarea:

_FFXpath("//textarea[@name='strMessage']","",9) 
_FFObj("xpath.value='"&$text&"'")

and $text is from GuictrlcreateEdit().

But how I can put txt with "ENTER" or sign e.g. " or ' from GuictrlcreateEdit to the textarea? Someone knows how to solve this problem? Please, help.

Link to comment
Share on other sites

But how I can put txt with "ENTER" or sign e.g. " or ' from GuictrlcreateEdit to the textarea? Someone knows how to solve this problem? Please, help.

i'm not really sure what the issue is, but if the issue is that the browser is not properly rendering symbols, you could urlencode your text string and try that... Edited by cameronsdad
Link to comment
Share on other sites

You mean:

_FFObj("xpath.value='urlencode("&$text&")'")

something like this?

ok, that made me laugh a little so i'm going to completely ignore the fact that you completely ignored my link. i thought i may have made a urlencode script a while back, but i'll definitely not search the forum for it if you won't. ;) here is a quick explanation: look up at the address bar in your browser, you can see a LOT of stuff up there, but you'll never see some things, spaces for example. When a space must be passed to a server side page for processing, it isn't sent as a space, it's sent as %23 (the number may be wrong, it's been a while since i've done any web related stuff) every printable and non printable character has a value, and the % escape character just tells the server or browser to substitute that value with the character the number represents when it processes it. sooooo, if you're having issues sending the same kind of characters that need to be replaced for the address bar, i was thinking one possible work around would be to use urlencode your text. to test that theory, you can use any of a multitude of web based scripts to convert the text in $text (google for sneak.php and use the first result at snarkles.net) and then try setting with THAT value.
Link to comment
Share on other sites

after urlencode i have:

Tre%259C%25E6d%2Bgfd%250D%250Ag%250D%250Ad%2Bg%250D%250Adf%2B%253D%2Bfd%250D%250Agd%250D%250Ag%2Bdf%250D%250Ag%2Bdf%250D%250Agdf%250D%250Agdfgdfgdfg%2Bdgd%250D%250Afgdfgdfgdfgdf%2B

and it's not working ;)

there is function:

ConsoleWrite(URLEncode("123abc!@#$%^&        "&@CRLF&@CRLF&"   *()_+ ") & @crlf)


Func URLEncode($urlText)
    $url = ""
    For $i = 1 To StringLen($urlText)
        $acode = Asc(StringMid($urlText, $i, 1))
        Select
            Case ($acode >= 48 And $acode <= 57) Or _
                    ($acode >= 65 And $acode <= 90) Or _
                    ($acode >= 97 And $acode <= 122)
                $url = $url & StringMid($urlText, $i, 1)
            Case $acode = 32
                $url = $url & "+"
            Case Else
                $url = $url & "%" & Hex($acode, 2)
        EndSelect
    Next
    Return $url
EndFunc   ;==>URLEncode

I still can not use such characters, apparently not this kind of coding?

Link to comment
Share on other sites

I still can not use such characters, apparently not this kind of coding?

decoding your string yielded "TreϾd gfd g d g df = fd gd g df g df gdf gdfgdfgdfg dgd fgdfgdfgdfgdf", is that what's displayed in your text box? see, you're saying that it's not working, but we don't see where the value is being created, or the result of trying to use it... it's easier to trouble shoot a problem that we can duplicate, and typically people aren't going to create a test case for your situation when you already have one that you're not showing... ya know? Edited by cameronsdad
Link to comment
Share on other sites

TreϾd GFD gdg df = fd gd g g GDF df df gdfgdfgdfg DGD fgdfgdfgdfgdf

In the text box is displayed (I'm typing):

TreϾd GFD 
gdg df
 = fd
 gd 
g 
g GDF 
df df gdfgdfgdfg
 DGD 
fgdfg
dfgd
fgdf

I want the same thing inscribed in the textarea with character "ENTER" =[

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