CODE:win w=window (-1, "Edit", window ("Безымянный — Блокнот", "Notepad", -1));
char state[256];
for (int n=0; n<256; n++)state[n]=0;
state[16]=128;
external(INT, "SetKeyboardState", "SetKeyboardState", "User32.dll");
attach(w,1);
/////////////////////////
SetKeyboardState(address(#state[0]);
postmessage(WM_KEYDOWN, 16, 0, w);
postmessage(WM_KEYDOWN, 222, 1, w);
sleep(100);
postmessage(WM_KEYUP, 222, 3221225472, w);
postmessage(WM_KEYUP, 16, 3221225472, w);
/////////////////////////// |