use alphabetical characters

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
8 posts Page 1 of 1
Contributors
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1891
Joined: Wed Dec 16, 2009 9:56 pm

use alphabetical characters
zachman61
I'm attempting to make a application which will scan a site for available usernames.
the way im wanting to do this is so that every .5 of a second or so it adds a letter for example:
time(0):
aaa

time(1):
aab

etc.
anyone know how to do this?
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: use alphabetical characters
MrAksel
Do you want it to be hardcoded with 3 chars or dynamic like you can change it? Its easier with hardcoding, but Ill try the dynamic way.

Edit
Code: Select all
    Private chars As Char() = "abcdefghijklmnopqrstuvwxyz"
    Private values(3) As Byte
    
    Private Sub Timer1_Tick() Handles Timer1.Tick
        For i = values.Length - 1 To 0 Step -1
            If values(i) + 1 >= chars.Length Then
                values(i) = 0
            Else
                values(i) += 1
                Exit For
            End If
        Next


        Dim res As String = ""
        For Each b As Byte In values
            res &= chars(b)
        Next

        'res is the output string
    End Sub
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: use alphabetical characters
mandai
It might be more effective if you used a list of characters.
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: use alphabetical characters
MrAksel
This method is not even near using 0.5 seconds :) That was what he asked for.
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: use alphabetical characters
mandai
If you used a list it would not be limited to 3 characters.
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1891
Joined: Wed Dec 16, 2009 9:56 pm

Re: use alphabetical characters
zachman61
mandai wrote:
If you used a list it would not be limited to 3 characters.
This one isn't limited to 3 characters?
I use all the alphabet and all numerical characters in a different one.
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: use alphabetical characters
MrAksel
I get what he means, but its probably not something much to care about. Just change the '3' in 'values' to the number of chars you want. You can also edit the chars as much as you want, add new, remove some or whatever.
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1891
Joined: Wed Dec 16, 2009 9:56 pm

Re: use alphabetical characters
zachman61
MrAksel wrote:
I get what he means, but its probably not something much to care about. Just change the '3' in 'values' to the number of chars you want. You can also edit the chars as much as you want, add new, remove some or whatever.
Yea i've already done that.
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
8 posts Page 1 of 1
Return to “Tutorial Requests”