Password string to ******** ?? - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: QBasic (http://qbasicnews.com/newforum/forum-4.html) +--- Forum: QB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-11.html) +--- Thread: Password string to ******** ?? (/thread-4768.html) |
Password string to ******** ?? - -dezell- - 09-27-2004 Once again, thanks guys, you've helped me without insulting me... so i have a question...again How to make password string look like "******" for example(you probably don't need it but I'm just trying to act smart ) Code: CLS Got too much creative on this one, but heck with it...u got it anyway Waiting for any answers Oh, one more question how do you make this QBASIC code? with what tags? [qbasic] PRINT "mama" [/qbasic] doesn't seem to work... Thanks! 8) Password string to ******** ?? - whitetiger0990 - 09-27-2004 You have to make your own input function. and since im in a thinking mood. I made one =P [syntax="QBASIC"]FUNCTION inputblur$ (question$, blurchar$) IF LEN(question$) > 0 THEN PRINT question$ + " "; x = POS(0) y = CSRLIN DO DO: press$ = INKEY$: LOOP UNTIL LEN(press$) > 0 SELECT CASE press$ CASE CHR$(13): EXIT DO CASE CHR$(8) IF LEN(foo$) > 0 THEN LOCATE y, x: PRINT STRING$(LEN(foo$), " ") foo$ = LEFT$(foo$, LEN(foo$) - 1) END IF CASE ELSE: foo$ = foo$ + press$ END SELECT LOCATE y, x IF LEN(blurchar$) > 0 THEN PRINT STRING$(LEN(foo$), blurchar$) ELSE PRINT foo$ END IF LOOP inputblur$ = foo$ END FUNCTION[/syntax] to use it you do Code: a$ = inputblur$ ("What's your name?", "*") and to make it have syntax highlighting you use this tag Code: [syntax="QBASIC"]Print "PIE!"[/syntax] EDIT: made it select case Password string to ******** ?? - Mango - 09-27-2004 I wrote this a while back...didn't look at the code before posting right now, so, I don't know if I should be embarassed by it's lameness or not...I did test it, however, and the sub works... Cheers Code: DECLARE SUB passWithConfirm (word$) |