Friday, June 5th 2026, 3:49pm UTC+2
You are not logged in.
Quoted
Original von creative
Er hat ein Tastatur Makro verwendet :)
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
LRESULT CALLBACK handleWindow(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
{
static HWND hButton = 0;
switch (nMsg)
{
case WM_CREATE:
hButton = CreateWindow(_T("button"), _T("Start after 3 seconds"), WS_VISIBLE|WS_CHILD, 10,10,300,20,hWnd,(HMENU)1337, GetModuleHandle(0), 0);
break;
case WM_TIMER:
{
HWND hFocus = GetForegroundWindow();
DWORD nStart = GetTickCount();
for (BYTE key = 'A'; key < 'Z'; key++)
keybd_event(key, 0, 0, 0);
while (GetTickCount() - nStart < 1020);
keybd_event('Z', 0, 0, 0);
KillTimer(hWnd, 1); break;
}
case WM_COMMAND:
{
if (1337 == LOWORD(wParam))
SetTimer(hWnd, 1, 3000, 0);
break;
}
case WM_DESTROY:
PostQuitMessage(0); break;
}
return DefWindowProc(hWnd, nMsg, wParam, lParam);
}
|

)
This post has been edited 1 times, last edit by "Yarin" (Dec 4th 2005, 4:36pm)