Special Folder
(→Example) |
|||
Line 18: | Line 18: | ||
Running this script will either create a .txt file called My File and fill the file with the contents of the list or f the file already exists, the list is placed in the file. | Running this script will either create a .txt file called My File and fill the file with the contents of the list or f the file already exists, the list is placed in the file. | ||
When saving to a file with the special folder function, you do not need to file to exist to populate it. | When saving to a file with the special folder function, you do not need to file to exist to populate it. | ||
+ | |||
<pre> | <pre> |
Revision as of 16:54, 15 April 2013
$Special Folder is a File Function. The function returns the path of a special system folder
This command will allow you to save to or grab a file from or to the Application Data folder, the Desktop, Program Files, Documents, and many more on the computer the script is run on.
Example
add list to list(%my list, $list from text("hello,hi,how are ya", ","), "Delete", "Global") save to file("{$special folder("Desktop")}/my file.txt", %my list)
Running this script will either create a .txt file called My File and fill the file with the contents of the list or f the file already exists, the list is placed in the file.
When saving to a file with the special folder function, you do not need to file to exist to populate it.
add list to list(%my list, $list from file("{$special folder("Desktop")}/my file.txt"), "Delete", "Global") type text(<about me textarea>, $random list item(%my list), "Standard")
If you are grabbing information from a file with the special folder function, you will need to make sure the file exists in the location specified.
Running the script will grab the information from the specified location, fill the list and insert a random list item into the specified field.