LOL!



Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
That's why they're so handy. If you want to do a temporary action that doesn't touch the stack at all and disappears when it's done, the template objects provide a sort of scratchpad. I mostly use it to convert htmltext back to plain text without all the tags. Set the htmltext of the templateField and retrieve the text. It's instant.
Can you give us an example of the use for this information? LC provides all the conversion commands you're likely to need for scripting and display of unicode text. It can also convert among different unicode types if you're moving text in and out of LC.keithglong wrote: ↑Fri Apr 29, 2022 9:19 amI have been experimenting with Unicode using LiveCode. Would anyone out there happen to have some sample code for getting the Unicode Number and HTML-Code/UTF-16BE Dec for a specific character? I would also like to learn how to use these numbers/codes to convert to and from Unicode in the LiveCode environment.
Well, I, for one, can think of a use for this information straight way . . .Can you give us an example of the use for this information?
Well, that is like saying that a motor car provides all the tools for driving it: but if you haven't had driving lessonsLC provides all the conversion commands you're likely to need for scripting and display of unicode text.
not really, it (the templatefield) is what the name says, the template for newly created fields.
Code: Select all
...
set the listbehavior of the templatefield to TRU
set the multiplehilites of the templatefield to TRUE
set the togglehilites of the templatefield to TRUE
set the hscrollbar of the templatefield to TRUE
create field
## Always a good idea to avoid surprises :-)
reset the templatefield
...
The Dictionary is your friend.I would also like to learn how to use these numbers/codes to convert to and from Unicode in the LiveCode environment.
Code: Select all
on mouseUp
ask file "Choose where you wish to export your text"
if the result = "cancel"
then exit mouseUp
else
put the htmltext of fld "XXXX" into url("file:" & it & ".html")
set the itemDelimiter to slash
set the defaultFolder to item 1 to -2 of the longFilePath of it
end if
end mouseUp