Best way to implement this bot?



  • Hi, first of all congrats to the developer, what a program :)
    Been learning for a few days about bas but i have a simple question
    I want my bot that once login(that's simple), every x seconds eg 10 do a request to my server and my server will return a url and some other basic data the bot needs to follow(automate), eg visit fb post url> place commment > connect to server(mark as done)> proceed next url if one exists
    Hope im clear, thank you



  • @rokiroki Let me be the first to say Welcome! BAS is a fantastic piece of code!

    For your login, you'll use the Browser commands to navigate to the url(s) and complete the steps like that of how you would as a person, click X button, type text in login/password box, etc.

    For your Bot <--> Server communicate, you'll want to use HTTP Client Get/Post request, get content and Json.prase the return (if its JSON).

    If you'll wanting the URLs to be launched as multithread, add the URLs as a Global Variable or create a resource and use them that way with a _call_section()!

    (I'm current replying from my phone so the code is just non-working examples)

    Check out the wiki and learn by each example if you haven't! I'm always here for the English community so drop me a PM when ever you get stuck with something!



  • HI @Allister thanks for the reply, i spent last two years trying to make this bot and due to the site having an extreme bot detection i was forced to use cef but my desktop programming skills arent good so when i found bas i was amazed
    About the bot, i wont do multithreading, it will be just a basic bot that will listen to server every x seconds and get the url and other data from the json, like comment etc, then the bot needs to visit the url and do the job, after that report back to server.
    So my last question is how to you suggest me to implement the loop(timing), should i use a for loop or?
    Thanks for your help



  • @rokiroki I would use a while loop and compare the current date with the time it should run (VAR_RUNAT = current + 2 hours) WHILE (currenttime < VAR_RUNAT) sleep(1000)! , or a for and compare the index with sleep. I.e i < 5 sleep(60000)! Would sleep 5 minutes.


Log in to reply