itexspert 47 Posted November 19, 2014 Report Share Posted November 19, 2014 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? Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted November 19, 2014 Report Share Posted November 19, 2014 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 Quote Link to post Share on other sites
itexspert 47 Posted November 19, 2014 Author Report Share Posted November 19, 2014 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"? Quote Link to post Share on other sites
Pete 121 Posted November 19, 2014 Report Share Posted November 19, 2014 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")} 1 Quote Link to post Share on other sites
itexspert 47 Posted November 19, 2014 Author Report Share Posted November 19, 2014 Thank You Kindly Mr. Zap! Quote Link to post Share on other sites
itexspert 47 Posted November 20, 2014 Author Report Share Posted November 20, 2014 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 withUi 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! Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted November 21, 2014 Report Share Posted November 21, 2014 ui button("Stop") { stop script} Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted November 21, 2014 Report Share Posted November 21, 2014 This will start/stop a particular definein this caseComment Pictures() ui button("Start") { set(#start, 1, "Global") loop while(#start = 1) { Comment Pictures() wait(.0001) }}ui button("Stop") { set(#start, 0, "Global")} Quote Link to post Share on other sites
itexspert 47 Posted November 21, 2014 Author Report Share Posted November 21, 2014 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? Quote Link to post Share on other sites
itexspert 47 Posted November 21, 2014 Author Report Share Posted November 21, 2014 More important can i use the define command to stop the scripts instead of UI Button? Quote Link to post Share on other sites
Evernano 2 Posted February 14, 2016 Report Share Posted February 14, 2016 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... 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.