Save to File

From UBot Studio
Revision as of 19:02, 12 April 2013 by LillyT (Talk | contribs)

Jump to: navigation, search

This command is a File Command. This command allows you to save text and lists to a file. You can specify the name and location where you want to save the file. If you are saving text, it will save it verbatim to the file, and if you are saving a list it will save it to the file one list item per line. You can read these files using the $read file or $list from file functions. You can save files with whatever extension you choose (i.e. .txt, .csv, .html, .bat, etc)


The two options that appear in command after dragging in into the scripting area are:

1. The Save As field: the location and name of file

2. The Content to Save field: where you would place content of the file

Example

navigate("http://www.ubotstudio.com/resources", "Wait")
wait(5)
save to file("C:\\Users\\LillyT\\Desktop\\test.txt", $scrape attribute(<href=w"/files/ScriptReferences/*">, "innertext"))

Running the script will navigate to the specified website, scrape the specified items, and save the scraped items to the file specified in the save to file command.

File:Savetofile.png

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox