Jump to content
UBot Underground

[TIP] How to Make Sure You Don't "Overfill" a Field When it Only Allows X Characters


Recommended Posts

I'm not sure if this has been mentioned on the forum before, but I remember a long time ago I had a question about this.

 

I was trying to make a bot, and was using the randomly generated last name & was adding 4 random numbers to it (like this: salvadore3927). I was using that "formula" to generate random usernames when signing up to sites.

 

I kept running into a problem though...most sites have a limitation on username length, and I would randomly get usernames that were beyond that length and the bot would stop. Now, I knew what that limitation was, but I had no way "shorten" my username or make sure that it was only X length.

 

I came up with a solution, but forgot to come back on here & provide it so others who had the same problem might be able to find it...so, here it is (it's actually very simple).

 

http://img593.imageshack.us/img593/1211/examplep.jpg

 

I've also attached a bot that you can download that will randomly generate a new username on each press of the play button, and each time it does it makes sure that it isn't longer than 10 characters & then it displays the newly "trimmed" username on screen.

Example.ubot

  • Like 3
Link to post
Share on other sites

I'm not sure if this has been mentioned on the forum before, but I remember a long time ago I had a question about this.

 

I was trying to make a bot, and was using the randomly generated last name & was adding 4 random numbers to it (like this: salvadore3927). I was using that "formula" to generate random usernames when signing up to sites.

 

I kept running into a problem though...most sites have a limitation on username length, and I would randomly get usernames that were beyond that length and the bot would stop. Now, I knew what that limitation was, but I had no way "shorten" my username or make sure that it was only X length.

 

I came up with a solution, but forgot to come back on here & provide it so others who had the same problem might be able to find it...so, here it is (it's actually very simple).

 

http://img593.imageshack.us/img593/1211/examplep.jpg

 

I've also attached a bot that you can download that will randomly generate a new username on each press of the play button, and each time it does it makes sure that it isn't longer than 10 characters & then it displays the newly "trimmed" username on screen.

 

 

Great share crazy! Just to let you know, I think this will be included in the new pro & developer license also.

Link to post
Share on other sites

Great share crazy! Just to let you know, I think this will be included in the new pro & developer license also.

 

 

I believe that the Pro & Dev licences will have string handling functions like Trim, so no need to mess about with javascript functions like substring, etc. ;)

 

That will make life a lot easier. The less I have to mess with JavaScript, the happier I am (because I know diddly about JS).

Link to post
Share on other sites
  • 3 months later...

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