myubo 2 Posted December 6, 2022 Report Share Posted December 6, 2022 Can you comment out code in Ubot? I don't always want to delete the code since I might use it later. I in php you can just do // before the code, or like this: /* code here */ Quote Link to post Share on other sites
unurohack 1 Posted December 7, 2022 Report Share Posted December 7, 2022 You can comment in ubot. comment("comment 1 here") navigate("google.com","Wait") comment("comment 1 here finished") Quote Link to post Share on other sites
myubo 2 Posted December 7, 2022 Author Report Share Posted December 7, 2022 So no way to comment out bunch of lines of code? For example below works in PHP. BUT if you do the below in Ubot, Ubot turns the code green and just deletes the code when you switch views. /* wait(5) navigate("google.com","Wait") wait(5) */ OR // wait(5) // navigate("google.com","Wait") // wait(5) Quote Link to post Share on other sites
gijosu 9 Posted December 7, 2022 Report Share Posted December 7, 2022 use the comment command comment("navigate(\"http://content.ubotstudio.com/resources/\",\"Wait\") click($element offset(<tagname=\"a\">,3),\"Left Click\",\"No\") ") 1 Quote Link to post Share on other sites
stephenzeiner 12 Posted December 18, 2022 Report Share Posted December 18, 2022 It's wildly impractical and even just nightmarish to attempt to use the "comment" command to temporarily block out a section of code. This is especially true if one is working directly in "Code View" and are reluctant to copy-paste the code you want to avoid running into a comment command from within "Node View" where any/all quotation mark escaping will happen automatically. While neither perfect nor optimal, here's another option that you can deploy directly from within "Code View": define skipcode { navigate("http://content.ubotstudio.com/resources/","Wait") click($element offset(<tagname="a">,3),"Left Click","No") } And since your program is presumably not going to call the "skipcode" command, the code that exists within the aforementioned command never gets run. I want to emphasize again that this isn't super optimal. It is, at least from my perspective, preferable to attempting to use the comment command - at least when working directly in "Code View." Hope this adds another potential option to your arsenal. 2 Quote Link to post Share on other sites
Rustproof 3 Posted December 27, 2022 Report Share Posted December 27, 2022 @myubo You could move your code into a loop, then make the loop value to zero. Good luck! loop(0) { wait(5) navigate("https://google.com","Wait") wait(5) } 2 Quote Link to post Share on other sites
myubo 2 Posted December 27, 2022 Author Report Share Posted December 27, 2022 (edited) @Rustproof That is an awesome idea! I can keep all the code without having to modify it and reuse it later if I need. Nice job buddy, nice job haha. This should be pinned to the top Edited December 27, 2022 by myubo 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.