Post: How to make a Console application type random letters
12-17-2014, 04:42 PM #1
Teenage Modz
Do a barrel roll!
(adsbygoogle = window.adsbygoogle || []).push({}); Hello ngu today i will show you guys how to make a console application in C# to type random letters(this is comming from my upcomming project that i have been working on).

First things first you want to create a console application.(name it anything you want )

Step2: we are going to need system.threading, system.windows.forms(for this one you need to find the reference),
and system media. You must login or register to view this content.


Step3: we're going to want to create a definition(For the noobs out there type the code below class program).
     public static Random _random = new Random();

You must login or register to view this content.

Step4: we are going to name this console application anything we want, so under static void main(string[] args)
type: Console.WriteLine("Name this part anything you want")
You must login or register to view this content.

Step5: lets create the thread for out auto typer
    Thread autoTyper = new Thread(new ThreadStart(AutoTyper));


now this leaves you with an error, lets fix this error Happy

Step6:
     public static void AutoType()
{

while (true)
{
char key = (char)(_random.Next(25) + 65);

if (_random.Next(2) == 0)
{
key = char.ToLower(key);
}

SendKeys.SendWait(key.ToString());
Thread.Sleep(_random.Next(500));
}

step7: now lets go back up to where the newly created thread was,
we now need to tell this to run and when to stop.
You must login or register to view this content.


Now lets debug it, and the finish product should just start typing random letters(to stop it just press enter on your keyboard).
Last edited by Teenage Modz ; 12-17-2014 at 04:58 PM.
12-17-2014, 04:51 PM #2
Dan
I'm a god.
Originally posted by Another View Post
snip


There's no image in step seven.
12-17-2014, 04:57 PM #3
Teenage Modz
Do a barrel roll!
Originally posted by Dan View Post
There's no image in step seven.

oh my bad man, thank you for telling me.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo