
The chael
Newbie
Apr 4, 2006, 8:10 PM
Post #1 of 2
(553 views)
Shortcut
|
|
[Tut] How to make a 'slightly more advanced' autotalker (VB 05)
|
Can't Post
|
|
You will need to make:3 Textboxes,2 buttons and 2 radio buttons they should be named (respectivly): TextBox1 TextBox2 TextBox3 btnStart btnStop RadioButton1 RadioButton2 Now you have got them named you could set them out a bit like this:[URL=http://imageshack.us] Now, doubleclick on the 'Start' button and enter this code (some may be already entered, dont re-enter it): Public Class Form1 Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click 'Sets the timer Timer1.Interval = TextBox3.Text * 1000 'Starts the timer Timer1.Enabled = True End Sub Private Sub btnStop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStop.Click 'Stops the timer Timer1.Enabled = False End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If RadioButton1.Checked = True Then SendKeys.Send(TextBox1.Text) 'Tells it to only send from TextBox1 if RadioButton1 is checked End If If RadioButton2.Checked = True Then SendKeys.Send(TextBox2.Text) 'Tells it to only send from TextBox2 if RadioButton2 is checked End If SendKeys.Send("{ENTER}") 'Tells it to press the enter (return) key End Sub End Class
Now that you have entered that, de-bug it. It should work like this: You enter two messages, one in each textbox (you can only enter one if you want).Now select a time delay(pick an apropriote one for the length of your message if using on runescape). Then you choose which textbox you want the application to use by select a radio button. Once you have selected the desired peice of text, press the start button and then click on the window in which you are using it on (probably runescape). It should start displaying your message with a gap of <your time delay> seconds in between each sending. Hope this was helpful, The Chael P.S if it does not work right, make sure the textboxes are in the right order in the design (so as your not trying to display the message of '6' at a delay of 'hi everyone' ). If you have any code errors, make sure all the items are named correctly. EDIT: I think I better add hoe you get the underline, like in the 'OR' in the above pic. I imagine everyone knows but i had a couple ask me how to do it on a diff forum. It is real simple, say you want to make an underscore on the 'E' in the word exit (assuming exit is a button) just edit the text of the button (not the code) to &Exit and it will make it, its the same for everything, just put the '&' symbol before the letter you want the underscore on.
(This post was edited by The chael on Apr 4, 2006, 9:19 PM)
|