Special Folder

From UBot Studio
Jump to: navigation, search

$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 bot or is run on.

Special Folder: Allows the choice of the following folder locations:

  • Application
  • Application Data
  • Desktop
  • Favorites
  • My Documents
  • My Videos
  • My Pictures
  • My Music
  • Program Files
  • Startup
  • System


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)


Specfol.jpg

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")


Specfol0.jpg


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.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox