Learjet 27 Posted February 11, 2016 Report Share Posted February 11, 2016 Hi Everyone! I have some files that need to be included in my Bot, but when compiled but I'm not sure how to code them in the program. They are just text files that are used to write to and then scrape form while the bot is running, as well as store information for later. Could one of you vets please let me know how to do this? Many Thanks! Peace,LJ Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted February 11, 2016 Report Share Posted February 11, 2016 Hello, You can use $read filenot sure what is in the file soooo.... I would tell you more. you can use that in an "add list to list" like thisnavigate("http://www.ubotstudio.com/tutorials","Wait")set(#read file,$read file("C:\\your file path"),"Global")add list to list(%a,$list from text($read file("C:\\your file path"),$new line),"Delete","Global")add list to list(%b,$list from file("{$special folder("Application")}\\your file.tat"),"Delete","Global") just a few examplespress Ctrl + e and type file u will see loads play with special folder"Application" means the same folder as your bot.exe or bot.ubot flle see file commands and file functionshttp://wiki.ubotstudio.com/wiki/Main_Page HTHelps, CD Quote Link to post Share on other sites
HelloInsomnia 1103 Posted February 11, 2016 Report Share Posted February 11, 2016 As CD already showed in his code, the answer (I think) you are looking for is a function called $special folder. This will allow you to choose a folder that will work on anyone's computer. If you try application for example it will store the text file in the same folder as the folder the program is located. The following is an example of how to use it, it will save a file on anyone's desktop without the full path needed. In most cases though you will probably be using something like application folder then maybe have a folder in there called data so it would be application\data\whatever.txt set(#save_file,"{$special folder("Desktop")}\\ubot.txt","Global") save to file(#save_file,"test") 1 Quote Link to post Share on other sites
Learjet 27 Posted February 11, 2016 Author Report Share Posted February 11, 2016 As CD already showed in his code, the answer (I think) you are looking for is a function called $special folder. This will allow you to choose a folder that will work on anyone's computer. If you try application for example it will store the text file in the same folder as the folder the program is located. The following is an example of how to use it, it will save a file on anyone's desktop without the full path needed. In most cases though you will probably be using something like application folder then maybe have a folder in there called data so it would be application\data\whatever.txt set(#save_file,"{$special folder("Desktop")}\\ubot.txt","Global") save to file(#save_file,"test") Thank you CD and Nick! You got it exactly Nick! I need to include the files in the complied package that I send to users and this will get me there :-) Thank you both very much! Peace,LJ 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.