Jump to content
UBot Underground

A good way to see what is going on in your script..


Recommended Posts

Hey Ubotters,

 

I am a bit new and already have been helped out quite a bit by this forum thanks to you all! I wanted to share something that might be obvious, but is good information for noobs...

 

I usually use this to debug my code... I read about creating error reports and all that stuff which is really the best way to go about debugging code.. but this is simple and easy to implement and can give you an idea of whats going on within the code..

 

I always like to create a "UI stat monitor" that tracks the variable "#status" or whatever you want to name it...

 

Then throughout my code I use the "set" option to reset the "#status" variable to whatever is currently going on in the code..

 

Here is a sample:

 

post-842-12755960146464_thumb.png

 

Once again this is not the best way by any means, but I hope this can help someone!

 

PS - If you dont have delays and are moving fast through the bot sometimes the label might not change.. just my experience..

 

duken dave

  • Like 2
Link to post
Share on other sites

Very nice! It can really give your endusers an idea what's happening and what the bot is 'thinking' at any given moment. I love it.

 

Will use soon!

Luke

Link to post
Share on other sites

Here is something else that I do.

 

I create a sub and I place all of my "UI Stat Monitors" in it. The cool part is that you do not need to Call the sub because that UI will continue showing your results. But once I get a bot completed I copy it to a new ".ubot" file and I delete the Sub. Compile and go. I don't have to go searching for those UI that I don't want the user to see. Of course it would be nice to have a switch to turn that Sub off entirely if it is not needed but I think I like it running this way.

 

Buddy

Link to post
Share on other sites

I too have used this quite often but it would be nicer to have the ability to watch the set variables as the script runs. That would be excellent.

 

Frank

Link to post
Share on other sites

I too have used this quite often but it would be nicer to have the ability to watch the set variables as the script runs.

 

??

 

You mean while your script is running, the variable doesn't change at the top of your ubot browser for you?

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

Advanced tip:

 

Say you have 20 Subs in a bot. At the start of each sub set your #statmon variable (as per the purpose of this thread) to a sequential number like "1" for the first sub, or 5 for the fifth.

 

Then as you go programming through it, add little notes, especially in your "Then" and "Else" nodes of what's happening at the moment, but always start those notes out with the number of that sub... EX: "17: Completed Signup at Twitter"

 

That way, even if you're away from the bot when it breaks, you'll know EXACTLY where the bot broke once you come back to it, down to the Sub and the choice it last made.

  • Like 1
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...