Save to File

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
Line 8: Line 8:
 
(i.e. .txt, .csv, .html, .bat, etc)
 
(i.e. .txt, .csv, .html, .bat, etc)
  
 
The two options that appear in command after dragging in into the scripting area are:
 
  
 
'''Save As:''' the file path complete with file name and file extension
 
'''Save As:''' the file path complete with file name and file extension

Revision as of 18:38, 24 April 2013

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)


Save As: the file path complete with file name and file extension

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