Sign in to follow this  
Followers 0
blizzedout

Script help...

8 posts in this topic

Ok i have a script that relogs in as differnet accounts, but when i get over 9 u have a problem because of two digits.

Send("chad00" & $AccountNumber & "@gmail.com")

how would i make it so if $AccountNumber > 9 then add a 0 in front of the number. or just have the numbers go like this 001,002,003,004,005,006,007,008,009,010,011....

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Something like this?

If $AccountNumber > 9 Then $AccountNumber = 0 & $AccountNumber

Or for the second one like this:

If $AccountNumber <= 9 Then $AccountNumber = 0 & 0 & $AccountNumber
If $AccountNumber > 9 Then $AccountNumber = 0 & $AccountNumber
Edited by big_daddy

Share this post


Link to post
Share on other sites

Something like this?

If $AccountNumber > 9 Then $AccountNumber = 0 & $AccountNumber

Or for the second one like this:

If $AccountNumber <= 9 Then $AccountNumber = 0 & 0 & $AccountNumber
If $AccountNumber > 9 Then $AccountNumber = 0 & $AccountNumber

So it will produce this?

$AccountNumber = 50
If $AccountNumber > 9 Then $AccountNumber = 0 & $AccountNumber

Account #: 050

and

$AccountNumber = 4
$AccountNumber <= 9 Then $AccountNumber = 0 & 0 & $AccountNumber

Account #: 004

?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

yea but what ill happen when i do

$AccountNumber = $AccountNumber + 1

Do the zeros interfear? or can i just remove them, like strip all the zeros before adding them.

Edited by blizzedout

Share this post


Link to post
Share on other sites

So it will produce this?

$AccountNumber = 50
If $AccountNumber > 9 Then $AccountNumber = 0 & $AccountNumber

Account #: 050

and

$AccountNumber = 4
$AccountNumber <= 9 Then $AccountNumber = 0 & 0 & $AccountNumber

Account #: 004

?

Yes it will...if you expect to go over 100 account you will have to allow for that:

$AccountNumber = 100
If $AccountNumber <= 9 Then $AccountNumber = 0 & 0 & $AccountNumber
If $AccountNumber > 9 And $AccountNumber < 100 Then $AccountNumber = 0 & $AccountNumber

Share this post


Link to post
Share on other sites

Yes it will...if you expect to go over 100 account you will have to allow for that:

$AccountNumber = 100
If $AccountNumber <= 9 Then $AccountNumber = 0 & 0 & $AccountNumber
If $AccountNumber > 9 And $AccountNumber < 100 Then $AccountNumber = 0 & $AccountNumber
Na i dont need it to go over 100 but thanks :o

just wana know if the zeros will interfear when doing:

$AccountNumber = $AccountNumber + 1

Share this post


Link to post
Share on other sites

Na i dont need it to go over 100 but thanks :o

just wana know if the zeros will interfear when doing:

$AccountNumber = $AccountNumber + 1

Well...try this, it seems to work fine for me:

$AccountNumber = 20
If $AccountNumber <= 9 Then $AccountNumber = 0 & 0 & $AccountNumber
If $AccountNumber > 9 And $AccountNumber < 100 Then $AccountNumber = 0 & $AccountNumber
InputBox("", "", $AccountNumber)
$AccountNumber = $AccountNumber + 1
If $AccountNumber <= 9 Then $AccountNumber = 0 & 0 & $AccountNumber
If $AccountNumber > 9 And $AccountNumber < 100 Then $AccountNumber = 0 & $AccountNumber
InputBox("", "", $AccountNumber)

Share this post


Link to post
Share on other sites

Works good thank man, tested it by doin this.

$AccountNumber = 0
While 1
$AccountNumber = $AccountNumber + 1
If $AccountNumber <= 9 Then $AccountNumber = 0 & 0 & $AccountNumber
If $AccountNumber > 9 Then $AccountNumber = 0 & $AccountNumber
MsgBox(4096, "Test", "Account #: " & $AccountNumber, 10)
Wend

Turns out when you add 1 to 001 it will produce 2 not 002 :o

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0