Klaus wrote: ↑Tue Apr 01, 2025 9:12 am
Please tell us what exactly you have tried so far.
Um...
fewchips wrote: ↑Tue Apr 01, 2025 3:52 am
I tried using the
set the text of field command but it didn't work.
<chuckle>
As Klaus's examples demonstrate, "put" is the most commonly used to set the value of a variable, put text into a field, put data into a file, display text in the message box, or upload a file to a server. The dictionary lays out like this:
Lc Dictionary wrote:
Use the put command to set the value of a variable, put text into a field, put data into a file, display text in the message box, or upload a file to a server.
Syntax:
put value [{before | into | after} container]
put value into URL destinationURL
Examples:
put "ABC"
put 3 + 12 into myVariable
put return someGlobalVar after field "Accumulations"
"set" is also very useful, but not for "setting" contents per se:
Lc Dictionary wrote:
Use the set command to change the setting of a property or custom property.
Syntax:
set [the] property [of object] to value
Examples:
set the textFont of button "next" to "Arial"
set the cursor to watch
set the backgroundcolor of graphic "background" to green
fewchips wrote: ↑Tue Apr 01, 2025 3:52 am
Also, where can I find some documents or tutorials to learn LiveCode effectively?
The dictionary is quite helpful, if for instance you want to know about oh, say, changing things about a font, you can type in 'font' and it will locate information regardless of where it falls in the dictionary. The downside is that you will pull up any entry with font in it, so some skimming is necessary.
I don't know about the most current incarnations of Lc or whatever it is called these days, but from 9.6 backwards there is a user guide included which covers the most basic topics.
Also, again, past editions had a link to samples in the initial loading (resources) in the ide, and of course you can do a general search for Livecode tutorials, there are a few around.
Always of course, any question you have can be asked here and likely answered to death
