put | |||||||||||||
Type | command | ||||||||||||
Dictionary | LCS | ||||||||||||
Library | LiveCode Script | ||||||||||||
Syntax |
| ||||||||||||
Summary | |||||||||||||
Introduced | 1.0 | ||||||||||||
OS | mac, windows, linux, ios, android, web | ||||||||||||
Platforms | desktop, server, mobile | ||||||||||||
Parameters |
| ||||||||||||
Example |
| ||||||||||||
Values |
| ||||||||||||
Related | Property: explicitVariables Message: urlProgress Keyword: binfile, ftp, message box, file, resfile, binfile, URL, resfile, http, after, field, before, http, word Control Structure: function Function: result, value, URLEncode Command: delete URL, put, local, open file, libURLftpUpload, libURLDownloadToFile Glossary: handler, variable, property, blocking, binary file, command, declare, resource fork, error, expression, local variable, upload, server, statement, container | ||||||||||||
Security | disk | ||||||||||||
Description | 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. If you use the put into form, the value replaces anything that was previously in the container. The put before and put after forms place the value before or after the current contents of the container. If you do not specify a container, the put command puts the value into the message box. If you put a value into a nonexistent container, LiveCode assumes it is a variable name, and initializes the container as a local variable. This is the most common way to create a local variable. You can also explicitly declare local variables with the local command. If the explicitVariables property is set to true, you must declare local variables before using them, and using the put command with a nonexistent variable causes an error instead of creating the variable. The action of the put...into URL form varies depending on the type of URL:
Then you can use the put command with a resfile URL type to create the resource fork.
Note: The Android and iOS engines do not support 'libUrl' but do allow you to use put in the background. When specifying URLs for iOS, you must use the appropriate form that conforms to RFC 1738. Ensure that you URLEncode any username and password fields appropriately for FTP URLs. Cross-platform note: The Web engine only supports HTTP and HTTPs protocols. Cross-platform note: URLs fetched by the Web engine from a domain other than that of the hosting the page may be blocked by web browsers, unless the server hosting the URL sets the "Access-Control-Origin" header appropriately. | ||||||||||||
Tags | text processing |