Results 1 to 12 of 12

Thread: [Visual C# 2005] trouble with auto typer

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2007
    Location
    127.0.0.1
    Posts
    27

    [Visual C# 2005] trouble with auto typer

    i have completed my auto typer but i would like to modify this code

    Code:
            private void timer1_Tick(object sender, EventArgs e)
            {
                SendKeys.Send(textBox2.Text);
                SendKeys.Send("(Enter)");
            }
    so it just "hits" enter because currently it is typing the word enter and "hitting" enter, i would like to fix it so it only "hits" enter.

  2. #2
    Fanatic Member BillBoeBaggins's Avatar
    Join Date
    Jan 2003
    Location
    in your database, dropping your tables.
    Posts
    628

    Re: [Visual C# 2005] trouble with auto typer

    Trying sending the keycode value rather then a literal.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2007
    Location
    127.0.0.1
    Posts
    27

    Re: [Visual C# 2005] trouble with auto typer

    thank you, could you give me the value of "enter" or tell me a link that gives all the values of each key.

  4. #4
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [Visual C# 2005] trouble with auto typer

    Are you using sendkeys to send a key to your own application? Why?
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Aug 2007
    Location
    127.0.0.1
    Posts
    27

    Re: [Visual C# 2005] trouble with auto typer

    it is an auto typer here is the full code

    Code:
    private void timer1_Tick(object sender, EventArgs e)
            {
                SendKeys.Send(textBox2.Text);
                SendKeys.Send("(Enter)");
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                timer1.Interval = timer1.Interval + Convert.ToInt32(textBox1.Text) * 1000;
            timer1.Enabled = true;
            }
    
            private void button2_Click(object sender, EventArgs e)
            {
                timer1.Enabled = false;
            }
    it is complete except that when i run and hit button1 it is supposed to type in the text from textbox1 which it does but it also "enter" and it does "hit" enter but it types it as well. i would like to fix it so it stops typing in the text enter and only "hits" the button enter. this program is supposed to be used for example maybe you want to "spam" someone on msn or aim so you continue to type whatever you write every second or less.

  6. #6
    Fanatic Member BillBoeBaggins's Avatar
    Join Date
    Jan 2003
    Location
    in your database, dropping your tables.
    Posts
    628

    Re: [Visual C# 2005] trouble with auto typer

    http://www.asciitable.com/
    I forget which number you are to use.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Aug 2007
    Location
    127.0.0.1
    Posts
    27

    Re: [Visual C# 2005] trouble with auto typer

    Quote Originally Posted by BillBoeBaggins
    http://www.asciitable.com/
    I forget which number you are to use.
    thanks that is perfect

    edit: am having trouble finding enter =/
    Last edited by skate4lifee; Aug 28th, 2007 at 05:22 PM.

  8. #8
    Fanatic Member BillBoeBaggins's Avatar
    Join Date
    Jan 2003
    Location
    in your database, dropping your tables.
    Posts
    628

    Re: [Visual C# 2005] trouble with auto typer

    Carriage Return

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Aug 2007
    Location
    127.0.0.1
    Posts
    27

    Re: [Visual C# 2005] trouble with auto typer

    its ok i found out what was wrong, i was doing
    Code:
    sendkeys.send("(enter)")
    when i should have done
    Code:
    sendkeys.send("{ENTER}")
    works fine now

  10. #10
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: [Visual C# 2005] trouble with auto typer

    MSDN SendKeys

    Here is MSDN documentation

  11. #11
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [Visual C# 2005] trouble with auto typer

    I'll have to ask again..
    Are you sending this to your own application?
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  12. #12
    Junior Member
    Join Date
    Jun 2007
    Posts
    26

    Re: [Visual C# 2005] trouble with auto typer

    Use the SendWait method instead of the Send, it works fine then.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width