How to restric username length to a particular charaters in macroes

johnmay5

Client
Регистрация
10.04.2011
Сообщения
83
Благодарностей
5
Баллы
8
e.g. In twitter, the user name has a restriction of 15 characters. i am pulling this name from macro , sometimes the name length is greater than 15 characters. Can this name length be restricted in macro..
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
682
Баллы
113
{-String.SubString-|-{-Person.HumanLogin-|-[Eng|4][RndNum|1970|1990]-}-|-0-|-12-} or instead of 12 put how many characters you would want.
Hope this helps.
 
  • Спасибо
Реакции: johnmay5

johnmay5

Client
Регистрация
10.04.2011
Сообщения
83
Благодарностей
5
Баллы
8
Thanks Jones, that did not work the way i wanted, though can you pls explain what does this string achieve.. may be i am not clear on its usage..
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
682
Баллы
113
It should work, worked on my end. It just takes the string and splits it down to how many characters you want. Here's some examples that I got when I ran it so that you can see the ways to use it.

{-String.SubString-|-{-Person.HumanLogin-|-[Eng|4][RndNum|1970|1990]-}-|-0-|-15-}
tantnbiktillrea

{-String.SubString-|-{-Person.HumanLogin-|-[Eng|4][RndNum|1970|1990]-}-|-0-|-5-}
bothe

{-String.SubString-|-Hellomynameistoolongforinput-|-0-|-11-}
Hellomyname

{-String.SubString-|-{-File.GetString-|-\Resources\email.txt-|-random-|-false-}-|-0-|-15-}
ShaneQueen72836

{-String.SubString-|-Shit I Can't Have Too Many Letters In My Username So I'm Screwed-|-0-|-15-}
Shit I Can't Ha
 

johnmay5

Client
Регистрация
10.04.2011
Сообщения
83
Благодарностей
5
Баллы
8
Thanks once again Jones.. That makes it easier to understand.. BTW i was trying to use it take value from the name field by taking the execution result and then adding random numbers to it and then restricting it to number of characters..
BTW, your wordpress video has helped me a lot in logging into accounts created..

Have one more question.. say you have a lot of wordpress accounts stored in a file in the format.. username|password

and now trying to log in using one of the accounts in the file.. how to ensure that the password picked up by the file is pertaining to the username picked up.
If the string value is kept as 0 instead of random in the macro ( take a line from a file ), the template will always pick up the first line in all the threads..

Should i add a counter to the steps and then put that counter's result into the string value instead of random or 0..

Edit:

NVM.. got it from HB's reply to one of the questions..
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
682
Баллы
113
Take the line from the file.

String split that result: 0 gives you username
String split: 1 gives you password
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)