Jump to content
UBot Underground

how do you trim a username to 10 characters?


Recommended Posts

With the standard license you'll need to first make sure the page you have loaded has javascript elements so that ubot can use js functions. If you need help with getting a page to load javascript so that this stuff works send me a PM and I'll walk you through a hack for non-js enabled pages..

 

Let's assume the page has JS loaded already. From there, I'd set #variable = to an eval of : "{1}".substring(0,X);

 

{1} is the ubot filler for your variable you want trimmed, and X is the length you want it trimmed to. Eval tells ubot to 'evaluate' what's in the box. In this case we're telling ubot to use javascript to load the string and cut a chunk out, starting at the 0 position going until the Xth character. Hope this helps

Link to post
Share on other sites

You also have the option (if that's the way your script is set up) to use Dave's eval in a set command at the beginning of the script since ubot defaults to a js enabled page.

 

So if your ui text box is #username and the input is dangthisisalongusername, you can immediately use a set command to re-set the variable and shorten it. If that;s not possible (i.e. the string is not in the ui inputs elements) then you will need the workaround Dave is referring to.

 

John

Link to post
Share on other sites

ok

 

Let's assume the page has JS loaded already. From there, I'd set #variable = to an eval of : "{1}".substring(0,X);

 

 

 

can you help on that?

 

i dont know how to set a variable like that.

 

this is what i did?

 

set #variable1

 

content: $eval

 

on eval i type "{1}".substring(0,10);

 

and below eval i put the variable again.. #variable1

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