Jump to content
UBot Underground

Is it possible to temporarily "comment out" code without deleting it?


Recommended Posts

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 */

Link to post
Share on other sites

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)

 

Link to post
Share on other sites

use the comment command

 

comment("navigate(\"http://content.ubotstudio.com/resources/\",\"Wait\")
click($element offset(<tagname=\"a\">,3),\"Left Click\",\"No\")
")

  • Like 1
Link to post
Share on other sites
  • 2 weeks later...

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.

  • Like 2
Link to post
Share on other sites
  • 2 weeks later...

@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 by myubo
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...