Click to See Complete Forum and Search --> : Pressing Keys Again
boo
Nov 27th, 1999, 07:28 AM
I need a program that presses the arrow buttons every 2 seconds and switches them every time meaning 2 seconds left 2 seconds then right. Somebody answeredd this before but that wasn't what i wanted. i need to do this so that the program will run, and the keys will move something in another program. In the other program to move from left to right you press > and <, but i want the program to press it for me. Please help me with this!
dim Left as boolean
'timer interval = 2000
timer1:
If Left Then RaiseEvent Form1_keypress(KEYLEFT)
If Not Left Then RaiseEvent Form1_keypress(KEYRIGHT)
Left = Not Left
End Sub
change KEYLEFT and KEYRIGHT for the ascii codes for the left and right arrows respectively
and change form1 to what ever control that you want to respond to the keystroke
i just made this up, dont know if it will work.
------------------
Wossname,
Email me: wossnamex@talk21.com :)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.