Saving data to file or database after script completes

  • So I am making a script to visit a site and register an account and then save that account info into one file.

    I need the bot to save the username:password in that format and each new username and password should write to a new line in the same file.

    Problem is I cannot figure out how to set this up to save the info into one file without the bot creating a new file for each entry. Need help

    Is the solution to use the database? If so how do i get the script to enter the registered username:password after the script successfully runs

  • Hey @cleez

    Create a new database, a new table "Accounts". Add column, Username & Password.
    Save & Restart the script, inside the recorder use the Database functions "Insert" Select "Accounts" for the table and put the new Username & password inside there.

    You can also use Results which are located in the scripts directory\appslocal\logs{RESULT_NAME}\Time_Stamped.txt
    & it's viewed inside the bot on the tab next to "Logs".
    Recorder command is Tools> Result. You can edit these by "stopping" the recorder & down at the bottom to the right/left of the "log" tab. Change Title & checkbox "Visible".

    If you have your own file you can use the Write List To File command inside "Filesystem" on the recorder. Make sure you check "Append"

    Let me know if this helps!

    Allister ☯

  • @Allister It definitely helps thank you

  • @Allister Is there a way to grab a random item out of a database? Like if i want to make an bot to post comments but i want to grab a random line out of my database table instead of doing it in order?

  • @cleez

    Sure can, if you're using Database Resource, Edit it and check "Mix Lines". Make sure you set the setting accordingly if you want to re-use the lines. if you're using Select Records Command via the script, you can use [cate]List ---> Random Element command using the Select Record Variable (pre-set: [[RECORD_LIST]]).

    Allister ☯

  • @Allister Thanks again!

Log in to reply