Free Games Forum
Free Games Games Forums Music Forums TV Forums

  Free Games Forum Home FORUM
HOME
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN
Rules & FAQ RULES / FAQ
REPORT SPAM

Free Games Forum: Game Technology: Visual Basic / VB:
[Tut] How to make a 'slightly more advanced' autotalker (VB 05)

 

 


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):


Code
    

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'Blush). 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)



Jaymzanator
Enthusiast


Apr 5, 2006, 2:34 AM

Post #2 of 2 (545 views)
Shortcut
Re: [The chael] [Tut] How to make a 'slightly more advanced' autotalker (VB 05) [In reply to] Can't Post

ok

why not make the following changes

instead of


Quote


Timer1.Inteval = Text1*1000



try


Code
   

on error resume next

dim delay as short '(or int)

delay = val(TextBox3.Text)

delay = delay * 1000

if delay <= 500 then

msgbox "delay is too short please enter a value above 0.5"

exit sub

end if



(17:20) Taz:
and tazg is lol'in at you all the way from canada
(17:21) James:
lol canadians

 
 
 


Search for (options) Web Design by Web Ideas - Page loaded in: 0.17 s on (CGI/1.1)