Results 1 to 3 of 3

Thread: Pressing Keys

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 1999
    Posts
    36

    Post

    I want to make a program that presses the up key and then the down key switching off every 2 seconds. I know how to switch them, but I don't know how to make the program press the keys. Please help me do this!

  2. #2
    New Member
    Join Date
    Nov 1999
    Posts
    12

    Post

    Add a Timer Control first and set it to Enabled = False. Then:
    Timer1.Interval = 2000
    Timer1.Enabled = True
    SendKeys "{up}" &chr(08) &chr(08)
    Depending on what your doing or sending to...it will create 2 numbers if it goes to a textbox so chr(08) will remove them for you!
    Use chr(13) to send a Return Carriage (Enter)

  3. #3
    New Member
    Join Date
    Nov 1999
    Posts
    12

    Post

    Forgot to mention something. Check the SendKeys help in your VisualBasic Helpfile.
    SendKeys "{down}" will send the down arrow!
    There ya go!

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