Jump to content
UBot Underground

Define Command And Alert Message??


Recommended Posts

Guys i am having a small issue with Alert Command see i already created a stable working bot it all work thing i i would like users to know when some process is done this is a small part of the code its pretty basic stuff.

 

ui text box("Username"#Username)
ui text box("Password"#Password)
define Login to Your Account {
    navigate("www.gramfeed.com""Wait")
    wait(4)
    if($exists(<outerhtml="<img src=\"/Instagram_signin.png\" border=\"0\">">)) {
        then {
            click(<outerhtml="<a class=\"link\" onclick=\"logOauth(0)\" href=\"/oauth/login\"><img src=\"/Instagram_signin.png\" border=\"0\"></a>">, "Left Click", "No")
            wait(3)
            wait for browser event("Everything Loaded", "")
            type text(<username field>, #Username, "Standard")
            type text(<password field>, #Password, "Standard")
            click(<login button>, "Left Click", "No")
            wait(3)
        }
        else {
        }
    }
    alert("You Have Successfully Logged In")
}

 

 

The Problem is After this process is Completed i don't get the message (You have successfully logged in)

 

Like i said everything is pretty much done all i need is to figure out why does the message not popping up?

 

Can anyone help?

Link to post
Share on other sites

The Define's themselves don't run.

You need to go to custom commands and drag you named command to where you want it to run.

 

It will be located in your tool box under commands then should be last option iv v5.x

 

Otherwise they are ignored like comments.

 

HTHelps,

 

CD

Link to post
Share on other sites

Ok so i do that and then what where do i place Alert?

 

let say my command is called  "Login interface" and i pull it in Ubot now how does the Alert Fit in do i just put it below the "Login interface"?

Link to post
Share on other sites

ui text box("Username"#Username)
ui text box("Password"#Password)
Login to Your Account()
define Login to Your Account {
    navigate("www.gramfeed.com""Wait")
    wait(4)
    if($exists(<outerhtml="<img src=\"/Instagram_signin.png\" border=\"0\">">)) {
        then {
            click(<outerhtml="<a class=\"link\" onclick=\"logOauth(0)\" href=\"/oauth/login\"><img src=\"/Instagram_signin.png\" border=\"0\"></a>">, "Left Click", "No")
            wait(3)
            wait for browser event("Everything Loaded", "")
            type text(<username field>, #Username, "Standard")
            type text(<password field>, #Password, "Standard")
            click(<login button>, "Left Click", "No")
            wait(3)
        }
        else {
        }
    }
    alert("You Have Successfully Logged In")
}

  • Like 1
Link to post
Share on other sites

Hey guys i hit a snag......again i know i am getting boring but instead of making new topic i will just post it here

 

I have a huge script and everything works fine what i cant figure out is how to put like a Stop button which stops all processes i read here and saw few examples with

Ui Buttons

 

Thing is my entire script is in between "Define" commands and i don't know how to apply it to that feature i will give you example:

 

  Comment Pictures()
define Comment Pictures {
        navigate("http://www.gramfeed.com""Wait")
        wait(4)
        type text(<id="search-query">#hashtag"Standard")
        click(<src="/search-icon.png">"Left Click""No")
        wait(6)
        click(<onclick="showPhoto(0)">"Left Click""No")
        if($exists(<src="/gramfeed_logo_31b.png">)) {
            then {
                loop(#number comment) {
                    if($exists(<src="/gramfeed_logo_31b.png">)) {
                        then {
                            wait(1)
                            type text(<name="lb-comment">#comment"Standard")
                            wait(1)
                            click(<id="lb-postComment">"Left Click""No")
                            wait(2)
                            click(<class="lb-next">"Left Click""No")
                        }
                        else {
                        }
                    }
                }
            }
            else {
            }
        }
    }
    navigate("http://www.gramfeed.com/instagram/tags#cars""Wait")
}
How Many Users to Follow from your List()
define How Many Users to Follow from your List {
    set(#running"true""Global")
    set user agent("Chrome")
    create table from file(#usersfromlist&test1)
    set(#row, 0, "Global")
    loop(#listfollowers) {
        navigate("http://www.gramfeed.com/{$table cell(&test1#row, 0)}""Wait")
        wait(6)
        if($exists(<innerhtml="+ follow">)) {
            then {
                click(<innertext="+ follow">"Left Click""No")
            }
            else {
                click(<innertext="+ Request">"Left Click""No")
            }
        }
        wait(3.5)
        increment(#row)
    }
    alert("{#listfollowers} Users have been Succesfully Followed!")
    navigate("http://www.gramfeed.com/instagram/tags#cars""Wait")
}

 

 

 

Now,do i create like a global variable inside my Script and just put it in every module of the define command so that user triggers it once he presses it?

I work only with define commands for now because i am designing different interface than the one from default Ubot interface so i could really use your input on this its really important.

 

Thanks in Advance!

Link to post
Share on other sites

This will start/stop a particular define

in this case

Comment Pictures()

 

 

ui button("Start") {
    set(#start, 1, "Global")
    loop while(#start = 1) {
        Comment Pictures()
        wait(.0001)
    }
}
ui button("Stop") {
    set(#start, 0, "Global")
}

Link to post
Share on other sites

So for every modules inside the script i will have to place this 

 

ui button("Start") {
    set(#start, 1, "Global")
    loop while(#start = 1) {
        Comment Pictures()
        wait(.0001)
    }
}
ui button("Stop") {
    set(#start, 0, "Global")
}

 

 

Can i use like a Global Function to stop entire script at once regardless of the modules which i am running?

Link to post
Share on other sites
  • 1 year later...

im looking for same thing... to stop a define after running it... on a globle scale..... one stop button in ui to stop any define that is running at any time.... I am gussing i need to put inside each define command and create one button for it... ??? working on this now but if any one could help out that would be great...

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...