I would like to try and create a small program which for example can make my keyboard press a key.
int main()
press tabulator
delay 1000 ms
press 1
repeat
something like that, but i cant find out how to make my keyboard the output?i tried searching around for it, but was unable to find anything to really help me. I think i've read that its OS depending, and i would like to make the program for windows 7. Im very new at this, and any help would be greatly appreciatet.
Could you elaborate a little bit on what you mean by make your keyboard press a key?
I'm not sure I am understanding what exactly you are trying to do. From your example it looks like you want the program to simulate pressing the tab key then delay for a second then press the number 1 and then repeat the process. Is this correct?
If it is you are correct you will need to use win32 most likely to accomplish this for windows and you could use the SendInput() function to do this http://msdn.microsoft.com/en-us/library/ms646310%28v=vs.85%29.aspx
Though since you are just beginning the win32 api might be a bit hard to understand so you might want to get the hang of the basics first before moving on to this.
ok i understood nothing about SendInput() so i tried looking into keybd_event
tried making alittle something with it, but.. yea well.. would this work? i guess this repeats it 100 times before stopping, with a delay of 2 seconds between each run? atleast im hoping thats what it does¨