Jump to content
UBot Underground

Help Function Or Command Titles


Recommended Posts

I don't if it's possible or its already there but I couldn't find a way to set title or commands, so that one can identify what that particular command is for.

 

like I have a command of many loops but how to set its name like Loop-for login, loop for images etc, 

 

I know define can do this but other than this.

Link to post
Share on other sites

As of my knowledge you can either:

 

- use a define in order to create a custom named chain of commands.

- just place a "comment" above your command and write within this comment.

  • Like 1
Link to post
Share on other sites

If you keep your commands small, name them well, and follow a high level -> low level structure then your code will read better.

 

High level commands will just say what things do.

 

Low level commands will do the work.

 

For example to search Google you might have a high level command named SearchGoogle. This might contain a couple of commands in a loop: NavigateToSearchPage, ScrapeResults. Each of those might contain the actual logic. When you read the code you can see that it searches Google. If you need to see what that does then go to it and you will find that it loops and navigate to the pages and then scrapes the results. If you then need to dive deeper you can go down to the bottom level (NavigateToSearchPage, and ScrapeResults) which actually clicks on next page or parses the results from the page.

 

Of course this example is small you probably don't need to go this far for a small script. But when you have a larger project this makes a big difference.

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...