Эксперт
Покинул форум
Сообщений всего: 1489
Дата рег-ции: Июнь 2016
Репутация: 58
|
почему сей код теперь не работает?
спойлер (Отобразить)CODE:win w_KIB;
int ex_KIB, ey_KIB, sum_KIB, x_KIB, y_KIB;
start_();
написать("Gansdt@asd.urфывафыа", w_KIB)
function start_()
{
pause(1000);
int x, y;
getmouse(x, y);
w_KIB=getwindow(1, x, y);
ex_KIB=w_KIB.widthclient; ey_KIB=w_KIB.heightclient;
}
function написать(string str1, win w)
{
int len=size(str1);
char arr[1023];
char rus[63];
string alfa;
strcpy(#arr[0], str1);
int i=0;
int i2=0;
int n=0;
char state[256];
external(INT, "SetKeyboardState", "SetKeyboardState", "User32.dll");
external(INT, "GetKeyboardState", "GetKeyboardState", "User32.dll");
for(i=0;i<len;i++)
{
i2=formatci(arr[i]);
for(int c=32; c<57; c++);
{
if(i2==c) {attach(w,1);sleep(200); postmessage(WM_KEYDOWN, c, 1, w);sleep(100); attach(w,0);} //1-9
}
if(i2==48) {attach(w,1);sleep(200); postmessage(WM_KEYDOWN, 48, 1, w);sleep(100); attach(w,0);} //0
if(i2==46) {attach(w,1);sleep(200); postmessage(WM_KEYDOWN, 190, 1, w);sleep(200); postmessage(WM_KEYUP, 190, 3221225472, w); sleep(250);attach(w,0);}
if(i2==64)
{attach(w,1);
sendkeydown(16,w_KIB); sleep(250);
postmessage(WM_KEYDOWN, 50, 1, w);sleep(200); postmessage(WM_KEYUP, 50, 3221225472, w);
sendkeyup(16,w_KIB); sleep(250);
attach(w,0);
}
if (i2>=97)
{
if(i2<=122)
{i2=i2-32;
sendlanguage("00000409", w);
sleep(150);
postmessage(WM_KEYDOWN, i2, 1, w);
sleep(150);
postmessage(WM_KEYUP, i2, 3221225472, w);
}
}
//БОЛЬШАЯ РУС
if (i2>=192)
{
if (i2<=223)
{
sendlanguage("00000419", w);
sleep(100);
i2=i2-192;
i2=formatci(rus[i2]);
attach(w,1);
for (n=0; n<256; n++)state[n]=0;
GetKeyboardState(address(#state[0]));
state[16]=128;
postmessage(WM_KEYDOWN, 16, 1, w);
SetKeyboardState(address(#state[0]));
postmessage(WM_KEYDOWN, i2, 1, w);
sleep(100);
postmessage(WM_KEYUP, i2, 3221225472, w);
postmessage(WM_KEYUP, 16, 3221225472, w);
state[16]=0;
SetKeyboardState(address(#state[0]));
attach(w,0);
}
}
//маленькая рус
if (i2>=224)
{
if (i2<=255)
{
i2=i2-224;
i2=formatci(rus[i2]);
sendlanguage("00000419", w);
sleep(150);
postmessage(WM_KEYDOWN, i2, 1, w);
sleep(150);
postmessage(WM_KEYUP, i2, 3221225472, w);
}
}
}
} |