S
Spikey69
Guest
Please note, no part of this code, or the code completely, can be used or distributed without giving me credit for it... Respect my and everyone else's intellectual property!
Hey guys!
Just learning C# myself, so feel free to add to or comment on this idea...
I found it hard to find a good autotalker, I'm always soooo afraid that it might contain a trojan or whatever, and if you are too, this guide should be really helpfull to writing your own, first autotalker!!!
To start off, make sure you have the .NET FRAMEWORK running and the programming enviroment installed before following this guide...
Then, start a new project, call it whatever you like... You will now see a completely grey form... Press F5... Great, your program is running... Too bad it doesn't do anything yet!!
Close your program, and let's work on that layout...
Resize the form so that it looks about 1 thumbwidth high, and very wide (a very long square program)(it's cool to be square in cyberland!).
Try to find something called your Toolbox. In here you'll find loads of usefull Objects. Locate the object called Textbox and drag it on your form.
Now, with that textbox selected, find something called the properties... Here we can change our textbox' attributes... Change (name) to txtTalk. Change Text to nothing.
From your toolbox, add a button to your form... Click on it to select it and in your properties window, change name to btnTalk and Text to Talk!
Last, before we get the code, drag a timer on your form... It will jump straight to the bottom, even below your form... Don't worry, that's ment to happen... Select it, and change it's (name) to tmrTalk.
Press F5 again to launch your program... Woot, now it doesn't only look like crap, it doesn't do anything either!!! You might wanna get a bit more experience before sending this on your CV to Jagex...
Close that program and double-click on your button, called btnTalk.
What you should now be seeing is the code behind your program, something like:
It's really easy to explain really, when you'll click on your button once your program is working, the code between the two brackets, "{" and "}" will be excecuted...
First, we want the program to switch to Runescape... Then we want it to type letters and finally, we want it to send ENTER... Easy peasy... Ajust your code to this:
It basically means: wind up the timer to 1 second, switch to another program, let the timer wind off...
Launch your program by pressing F5, press to button and notice that it will swich to the latest program you used (probably not runescape at this point) and then... doesn't do anything...
Right, close your program and in the designer, double click on the timer called tmrTalk.
Now, you'll see this:
First of all, above the line "private void tmrTalk_tick(bla bla bla)", write:
We'll need this counter later on...
Between the brackets at the end (below tmrTalk_tick(bla bla bla)), ajust your code to:
It basically means: stop the timer, wind it up to whatever between 150 and 250 milliseconds, send the first letter (because the variable counter is 0) and add 1 to the counter, now wind off the timer...
Whatever random number of milliseconds later, the timer will go off again, saying, stop the timer, wind it up to whatever again, send the second letter , ... let's go again...
After a while it will have sent all the letters and then it will reset our variable called counter, and send enter...
Now before we test our program, make sure your code looks like this, however don't skip this entire tutorial and just copy paste, it won't work if you do!!!
Now press F5 to launch your program, and if you don't get any errors, congratulations, you just made your first autotalker!!!
Woot!
Close your program, close visual C#. It will ask you if you want to save your project, select yes!
Give it whatever name you would like, and save it ON YOUR DESKTOP (so we can locate it easely!!)
Now on your desktop you'll see a folder, open it, click on your programs name again, click on the folder bin, then click on the folder called debug, and there it is, YOUR AUTOTALKER!!!
Launch it, launch runescape, log in, type some text in your program, click the button and watch it talk!!!
W00T!!!
That was easy wasn't it??
I'd upload my program for everyone to use but I'm not sure I'm allowed on this forum...
Now if someone would follow this guide and post screenshots, as well as all comments and feedback, It'd be much appreciated!!!
Enjoy and have a nice day!!
Hey guys!
Just learning C# myself, so feel free to add to or comment on this idea...
I found it hard to find a good autotalker, I'm always soooo afraid that it might contain a trojan or whatever, and if you are too, this guide should be really helpfull to writing your own, first autotalker!!!
To start off, make sure you have the .NET FRAMEWORK running and the programming enviroment installed before following this guide...
Then, start a new project, call it whatever you like... You will now see a completely grey form... Press F5... Great, your program is running... Too bad it doesn't do anything yet!!
Close your program, and let's work on that layout...
Resize the form so that it looks about 1 thumbwidth high, and very wide (a very long square program)(it's cool to be square in cyberland!).
Try to find something called your Toolbox. In here you'll find loads of usefull Objects. Locate the object called Textbox and drag it on your form.
Now, with that textbox selected, find something called the properties... Here we can change our textbox' attributes... Change (name) to txtTalk. Change Text to nothing.
From your toolbox, add a button to your form... Click on it to select it and in your properties window, change name to btnTalk and Text to Talk!
Last, before we get the code, drag a timer on your form... It will jump straight to the bottom, even below your form... Don't worry, that's ment to happen... Select it, and change it's (name) to tmrTalk.
Press F5 again to launch your program... Woot, now it doesn't only look like crap, it doesn't do anything either!!! You might wanna get a bit more experience before sending this on your CV to Jagex...
Close that program and double-click on your button, called btnTalk.
What you should now be seeing is the code behind your program, something like:
Code:
private void btnTalk_Click(object sender, EventArgs e)
{
}
First, we want the program to switch to Runescape... Then we want it to type letters and finally, we want it to send ENTER... Easy peasy... Ajust your code to this:
Code:
private void btnTalk_Click(object sender, EventArgs e)
{
tmrTalk.Interval = 1000;
SendKeys.Send("%{TAB}");
tmrTalk.Enabled = true;
}
Launch your program by pressing F5, press to button and notice that it will swich to the latest program you used (probably not runescape at this point) and then... doesn't do anything...
Right, close your program and in the designer, double click on the timer called tmrTalk.
Now, you'll see this:
Code:
private void btnTalk_Click(object sender, EventArgs e)
{
tmrTalk.Interval = 1000;
SendKeys.Send("%{TAB}");
tmrTalk.Enabled = true;
}
private void tmrTalk_Tick(object sender, EventArgs e)
{
}
Code:
int counter = 0;
Between the brackets at the end (below tmrTalk_tick(bla bla bla)), ajust your code to:
Code:
Random rnd = new Random();
tmrTalk.Enabled = false;
tmrTalk.Interval = rnd.Next(150, 250);
if (counter < txtTalk.Text.Length)
{
SendKeys.Send(txtTalk.Text.Substring(counter, 1));
counter++;
tmrTalk.Enabled = true;
}
else {
counter = 0;
SendKeys.Send("{Enter}");
}
Whatever random number of milliseconds later, the timer will go off again, saying, stop the timer, wind it up to whatever again, send the second letter , ... let's go again...
After a while it will have sent all the letters and then it will reset our variable called counter, and send enter...
Now before we test our program, make sure your code looks like this, however don't skip this entire tutorial and just copy paste, it won't work if you do!!!
Code:
private void btnTalk_Click(object sender, EventArgs e)
{
tmrTalk.Interval = 1000;
SendKeys.Send("%{TAB}");
tmrTalk.Enabled = true;
}
int counter = 0;
private void tmrTalk_Tick(object sender, EventArgs e)
{
Random rnd = new Random();
tmrTalk.Enabled = false;
tmrTalk.Interval = rnd.Next(150, 250);
if (counter < txtTalk.Text.Length)
{
SendKeys.Send(txtTalk.Text.Substring(counter, 1));
counter++;
tmrTalk.Enabled = true;
}
else {
counter = 0;
SendKeys.Send("{Enter}");
}
}
Woot!
Close your program, close visual C#. It will ask you if you want to save your project, select yes!
Give it whatever name you would like, and save it ON YOUR DESKTOP (so we can locate it easely!!)
Now on your desktop you'll see a folder, open it, click on your programs name again, click on the folder bin, then click on the folder called debug, and there it is, YOUR AUTOTALKER!!!
Launch it, launch runescape, log in, type some text in your program, click the button and watch it talk!!!
That was easy wasn't it??
I'd upload my program for everyone to use but I'm not sure I'm allowed on this forum...
Now if someone would follow this guide and post screenshots, as well as all comments and feedback, It'd be much appreciated!!!
















