pasting text from revbrowser

Jim Ault jimaultwins at yahoo.com
Sat Jul 23 10:03:24 EDT 2011


On Jul 23, 2011, at 3:48 AM, Serge Brami wrote:
> I try to get  the contents of a  revbrowser window  and paste it  
> into a livecode  field
> the web page is a banking chart
>
> first I select manually the text in the revbrowser window
>
> Then  I Use revbrowserGet  selected put the contents into  
> myvariable  and paste it into a field  (using  :set   the htmltext  
> of field myfield  to myvariable)
> the problem is that all the return characters disappears
>
> Even  if  i copy  manually the text  and paste it directly in a  
> field i get the same thing
> If I copy the text manually and paste it into a Word processor  
> software it works fine   the return characters don't disappear

You have not specified which platform, but try this test

on checkReturns
    if the clipboardData contains numtochar(13) then
       answer "Found char 13, a return on a Mac"
    end if
  if the clipboardData contains numtochar(10) then
       answer "Found char 10, a return in Rev/ Unix"
    end if
  if the clipboardData contains CRLF then
       answer "Found char 1310, a return-line feed in Windows"
    end if
  if the clipboardData contains "<br" then
       answer "Found <br"
    end if
  if the clipboardData contains "<p" then
       answer "Found char <p"
    end if
end checkReturns

Also, look up CRLF in the dictionary.
Another factor in Html is that the <br> may be a tag that is used to  
create the effect of a return char on the web page.

A word processor program is designed to do many conversions for the  
user's convenience, such as clipboard conversions of text and graphics.

Hope this helps.

>
>

Jim Ault
Las Vegas






More information about the use-livecode mailing list