Jump to content

Script help...


Recommended Posts

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

Link to comment
Share on other sites

  • Moderators

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
Link to comment
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

?

Link to comment
Share on other sites

  • Moderators

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
Link to comment
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

Link to comment
Share on other sites

  • Moderators

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)
Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...