Hey guys,
im actually work on a login script.
But now i have a problem, i want a password field that shows at the inkey process stars(*) and not the character i write in the inkey-string.
This is what i wrote yet:
Code:
mouse_mode=0;
STRING* act_char=" ";
str_cpy((login_panel_password.pstring)[0],""); //clear the (stars)string
str_cpy((login_panel_password.pstring)[1],"");//clear the (chars)string
do{
if(key_any==1&&mouse_left==0&&mouse_right==0&&mouse_middle==0){
while(key_any==1){wait(1);}//<- this is the malefactor that slowed the inkey-process,
//but if i cut this out, all characters are doubly or more.
str_cpy(act_char," ");//clear the actually character string (lastpressed)
if(key_lastpressed!=14){//backspace is not pressed
str_for_key(act_char,key_lastpressed);//put the keycode of the last pressed key into act_char
str_cat((login_panel_password.pstring)[0],"*");
str_cat((login_panel_password.pstring)[1],act_char);
}else{
str_trunc((login_panel_password.pstring)[0],1);
str_trunc((login_panel_password.pstring)[1],1);
}
}
wait(1);
}while(key_lastpressed!=28&&str_len((login_panel_password.pstring)[0])<100);
mouse_mode=2;

But if i wrote faster, some characters are not in the string (like this "hllo gys").cry
Someone knows a trick that the normal inkey function do that what i want or what should i change on my script?

Sorry for my bad english. wink
Greetings David.

Last edited by Ralph; 01/10/09 02:14.