I'm not sure if this will work under Vista.
First of all, create a file that is called "user32.decls", and place it in
c:\program files\blitz3d\userlibs
Put these lines in that file:
After that you can use the command api_keybd_event() in your programs.
This code will press the key "A". Note that you should not only press the key, but also release it afterwards.
First open notepad, then start the code, then switch to notepad.
Every 2.5 seconds, it will press the 'A' key.
For more info on keybd_event, look here:
http://msdn.microsoft.com/en-us/library/ms646304(VS.85).aspx
First of all, create a file that is called "user32.decls", and place it in
c:\program files\blitz3d\userlibs
Put these lines in that file:
.lib "user32.dll" api_keybd_event%(bVk%, bScan%, dwFlags%, dwExtraInfo%) : "keybd_event"
After that you can use the command api_keybd_event() in your programs.
This code will press the key "A". Note that you should not only press the key, but also release it afterwards.
Repeat api_keybd_event($41, 0, 0, 0) ;keydown api_keybd_event($41, 0, 2, 0) ;keyup Delay 2500 Until KeyHit(1) End
First open notepad, then start the code, then switch to notepad.
Every 2.5 seconds, it will press the 'A' key.
For more info on keybd_event, look here:
http://msdn.microsoft.com/en-us/library/ms646304(VS.85).aspx