![]() |
|
[.NET] need help with auto typer in visual basic 10 - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] need help with auto typer in visual basic 10 (/showthread.php?tid=2180819) |
need help with auto typer in visual basic 10 - warezzz - Feb 4, 2012 ok im building for a friend a very simple basic auto typer with 1 text box 2 buttons and 1 timer...what i need to know is what would be the code i would put in if i added a second text box and wanted to make that how many times the auto typer cycled before stopping..so far this is what i have. Public Class Form1 Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick SendKeys.Send(TextBox1.Text) SendKeys.Send("{Enter}") End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Timer1.Start() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Timer1.Stop() End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged End Sub End Class what code would i add to textbox2 to make the program so that it cycles text then stops after however many cycles i specify in textbox2??? * - Killer1478 - Feb 4, 2012 Add this to the timer. My code is a bit sloppy but it will work. Code Textbox2.text = Textbox2.text - 1 ' <--- Subtract's 1 from the textbox before performing the rest of the function* - eXBTLegends - Feb 4, 2012 or make a label and do this for the timer Code Label1.text +=1* - Killer1478 - Feb 4, 2012 (Feb 4, 2012 06:24 PM)eXBTLegends Wrote: or make a label and do this for the timer I think he wants it so its user input, instead of him forcing it. I would probably also recommend that his start button makes the textboxes readonly to prevent errors, but thats just me. * - Zetryio - Feb 4, 2012 Add a numeric up and down and use this code, the numeric up down will be how many times it runs Code Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.TickForgot to add the increment, added it Something like that * - Cherish Life - Feb 4, 2012 I hate it when people use timers... L2Thread.... :\ Anyways, Use keycodes. * - warezzz - Feb 5, 2012 (Feb 4, 2012 06:32 PM)Cherish Wrote: I hate it when people use timers... L2Thread.... :\ would you give me an example of using keycodes im a noob but you cant knock me for trying to learn better methods * - 222bart - Dec 6, 2016 Hi I am an Absolute NOOB. I need an auto typer to typer a page of formatted text about 50-60 lines created in notepad, into a ruler notepad, or some other editors that don not allow paste function. Please can anyone help. Thanks * - DopplerAF - Dec 6, 2016 (Dec 6, 2016 12:33 AM)222bart Wrote: Hi I am an Absolute NOOB. You want a shovel ? stop grave digging. |