LOL I could, but I all ready did I thinkO.o; LOL I cant remember, I just ask stuff I didnt know on it, but for the most part its easy seeing as I did it and did have a clue yet on this stuffXD To use the keybd_event() you need to know that when your press something you know when yo pick it up, but the computer is not all that smart and will keep it down so you also need to make it press back up like in this code.
Code:
keybd_event(0,0,0,0);
keybd_event(0,0,KEYEVENTF_KEYUP,0);
This code press a key then lefts up on the key to simulate a keypressing. Best off looking up tho on your own, i'm not to good of a teacherXD. Then to get forcus on something I do a if(this is on) then put fouce thing on it, there is a faster way of doing it, but I like to make sure if its there or not.
Code:
if (FindWindow(NULL,"what your looking for")){
HWND pol = FindWindow(NULL,"what your looking for");
BOOL ret = SetForegroundWindow(pol);
I think thats all really. As much as I know anywaysXD LOL. Best of luck on it.
Part 2. I think there is. You have to look it up. To have like so meny sec. tho its easy. Just use
Code:
Sleep(for ever how long);
thats in millsec. So ever 1000 = 1sec.