Jump to content
UBot Underground

TheBigWeb

Fellow UBotter
  • Content Count

    201
  • Joined

  • Last visited

  • Days Won

    8

Posts posted by TheBigWeb

  1. The fact that tasklist shows a process(your bot) should suffice.

     

    if shows in tasklist then don't run else run.

     

     

    but dude has a point they can change name of exe

     

    perhaps use $get current app from filemanagement plugin

     

    http://network.ubotstudio.com/forum/index.php/topic/13237-free-file-management-plugin-multiple-commands-and-functions/

     

    It won't work if you just check for the process because as soon as the bot is loaded it shows in the task manager so it detects itself and then won't run. You have to check for a second instance.

    • Like 1
  2. Here's a nice little function for you all: -

    define $isInstanceLoaded(#pProcessName) {
        comment("PURPOSE: Returns true if there is already and instance loaded ********")
        divider
        set(#_processCount,0,"Local")
        set(#_isLoaded,$false,"Local")
        add list to list(%_processes,$list from text($plugin function("Advanced Shell.dll", "$shell batch hidden", "cmd.exe /c tasklist"),$new line),"Don\'t Delete","Local")
        loop($list total(%_processes)) {
            if($comparison($find regular expression($next list item(%_processes),#pProcessName),"= Equals",#pProcessName)) {
                then {
                    increment(#_processCount)
                }
            }
        }
        if($comparison(#_processCount,"> Greater than",1)) {
            then {
                set(#_isLoaded,$true,"Local")
            }
        }
        return(#_isLoaded)
    }
    
    • Like 3
  3. OK here is some rough and ready code which works :)

    on load("Bot Loaded") {
        clear list(%test)
        add list to list(%test,$list from text($plugin function("Advanced Shell.dll", "$shell batch hidden", "cmd.exe /c tasklist"),$new line),"Don\'t Delete","Global")
        set(#count,0,"Global")
        loop($list total(%test)) {
            if($comparison($find regular expression($next list item(%test),"Test.exe"),"= Equals","Test.exe")) {
                then {
                    increment(#count)
                }
            }
        }
        if($comparison(#count,"> Greater than",1)) {
            then {
                alert("Already Loaded!")
            }
        }
    }
    
    
  4. Here is how to do without plugins in ubot 5 with Iron Python

     

    if($comparison($find regular expression($run python with result("import subprocess

     

    tlist = subprocess.check_output(\'tasklist\', shell=True)

    tlist"),"UBot Studio.exe"),"= Equals","UBot Studio.exe")) {

        then {

            alert("Yes!")

        }

        else {

            alert("No!")

        }

    }

     

     

     

     

    CD

     

     

    You can use Advanced shell plugin too from ubotdev.com

     

    use shell batch hidden func

     

    and just put TASKLIST in it and should get same results almost

     

    Awesome both of you. Although it detects the 1st instance. I will have to perform a check that detects if there are two or more :)

  5.  

    Interested in this  ... saw the previous posts, especially this on one Posted 01 February 2014 - 10:01 AM (on this page above)...
     
    Is that strategy or similar ones still working?
     
    Do you have a members area where you offer tips and tricks?
     
    Thanks!!

     

     

    Hi there,

     

    Still working for me but I will let my customers chime in so you don't think I am biased :)

     

    You will get a Best Practice Guide when you purchase :)

  6. Try this build https://mega.nz/#!Qw5jmCDS!luBzmi2ZyJSDMvZsAzPJnKfz9oju_l6iuWn4zydnpaM

    Added a function called "$is already running", it returns true if there is already another instance running. However it doesn't look at the process name, it checks the name you put in there. So make sure you use a different name in different apps. Hope you find it usefull.

     

    Many thanks for this although I can't seem to get it working? Here is the code below: -

    on load("Bot Loaded") {
        if($plugin function("Open.Framework.dll", "$is already running", "Test")) {
            then {
                alert("Already running")
            }
            else {
            }
        }
    }
    
    
  7. Hi Guys 

     

    Thank you so much for all the input. I honestly appreciate it. You guys have great advice and I personally think I have my answer to which language to start with.

     

    As you all know: I don't have a clue about programming, but UB have teach me some, but not enough to have the knowledge that you all have.

     

    @Seth

    Firstly thank you for your input as well.

    It is nice to see that you also give me advice on this. I will gladly take your advice.

     

    1. It is NOT my plan to limit myself to those languages. My intention is just to make Ubot a little bit more understanding for myself, in the sense of how things really works. I have NEVER been interested in programming or even a web developing. I end up on Ubot because of TJ. TJ have been a VERY GREAT inspiration for me, due to the bots that he creates. I have seen TJ on some places where he advertise himself. I want to learn a language that can make my work much easier to understand and also to extremely excel in UBOT. You see Seth Ubot have been literally change my whole finance world, that's why I don't want to limit myself. It is just for the start up language.

     

    2. My plan with programming is to extremely excel in Ubot, create plugins for Ubot. Ubot is easy to learn and to create bots. But the language inside of it, I need to understand, so that I can do what I want to do.

     

     

    @Docta

    I also see that you choose Python and Ruby. It is nice to see people stand together for the same language. I will check the OOP out.

     

     

    @tnhomestead and @Edward: Thank you for the sites I will definitely have a look at them. I sooner I start learn the better for me. 

     

    @BigWeb: Can you please tell me why you choose Pascal or Delphi?

     

     

    Again thank you all for the advice. I will start with Python and head over to the rest of them. If python will help me excel in Ubot I wll go for it.

     

     

    Regards to All

     

    Vernon

     

    Well, i've not used Pascal and Delphi for MANY years and I don't think it's used much nowadays. Best stick to something like C++ or one of the other languages mentioned. The reason I used to love Pascal was it was well structured and such a great flexible language.

     

    Another great language which I've dabbled with recently is LUA / Corona SDK for writing games / apps.

  8. Hey guys,

     

    This is just a random post but I just wanted to say to everyone who sometimes gets frustrated with UBot with it's little glitches. IF YOU THINK OUTSIDE OF THE BOX THERE IS NOTHING YOU CAN'T DO IN UBOT! Obviously, we are not talking about writing games here.

     

    UBot has allowed me to create a successful product which has made some great money. I am also just about to release my second product which I know will be huge. UBot allowed me to do this in a much quicker time frame than had I coded this in C or some other programming language.

     

    Seth and team, thanks for making UBot awesome and I have made my money back MANY times over.

     

    So, if you get frustrated thinking you can't do something with UBot. Take step back, grab a coffee and think about the problem again because I guarantee there will be a solution.

     

    Have a great day guys!

    • Like 4
×
×
  • Create New...