Statistics: Posted by Sinuvoid — Mon Jan 28, 2008 6:43 am
Statistics: Posted by burger2227 — Sun Jan 27, 2008 8:36 pm
Statistics: Posted by Seb McClouth — Sun Jan 27, 2008 12:46 pm
Code:
DO UNTIL UserAllowed% CLS PRINT "Username:" User$ = PINPUT$(15,1,30,0,"") PRINT "Password:" Pass$ = PINPUT$(15,2,30,ASC("*"),"") IF User$ = "USER1" AND Pass$ = "ENTER" THEN UserAllowed% = 1 IF User$ = "ADMIN" AND Pass$ = "LETMEIN" THEN UserAllowed% = 1LOOP
Statistics: Posted by Patz QuickBASIC Creations — Sun Jan 27, 2008 10:24 am
Statistics: Posted by Sinuvoid — Sat Jan 26, 2008 10:05 pm
Statistics: Posted by Patz QuickBASIC Creations — Sat Jan 26, 2008 9:55 pm
Code:
DO scancode = INP(&H60) LOCATE 5, 10: PRINT scancodeLOOP UNTIL scancode = 1 'escape key press
Statistics: Posted by burger2227 — Sat Jan 26, 2008 7:44 pm
Statistics: Posted by Seb McClouth — Sat Jan 26, 2008 5:51 pm
Code:
CLSDOk = INP(&H60)CASE SELECT kCASE 2PRINT "This is number 2";CASE 3PRINT "This is number 3";END SELECTLOOP
Statistics: Posted by Sinuvoid — Sat Jan 26, 2008 4:52 pm
Code:
DO PRINT tdspl$;" " 'Display storing variable press$ = INKEY$ IF press$ <THEN> 0 THEN sb = LEN(dspl$) Ndspl$ = MID$(dspl$, 1, (sb - 1)) dspl$ = Ndspl$ ELSEIF press$ = CHR$(13) THEN EXIT DO ELSE dspl$ = dspl$ + press$ tdspl$=tdspl$ + "*" END IF END IF LOOP
[/quote]]Right.. I sat back and wrote a more simulated Password system, it asks for username, then the password.. and while you type the pasword it displays it as: "******"..
Very nice, and something you can play with, look over, and learn from maybe..
Psssys.bas (Made in FreeBasic, Tested in QBasic.. Runs well in both..)Code:
'Username/Password system by Rattrapmax6(Kevin(x.t.r.GRAPHICS))' Two test usernames: User1 and Admin'Passwords: User1 = Enter || Admin = LetMeIn' System is case-insensitive.. :)CLS 'Clear screenPRINT "Welcome!"PRINT "Enter User:";DO LOCATE 2, 12: PRINT dspl$; " " 'Display storing varible press$ = INKEY$ IF press$ <THEN> 0 THEN sb = LEN(dspl$) Ndspl$ = MID$(dspl$, 1, (sb - 1)) dspl$ = Ndspl$ 'Filter Enter, Exit for checking ELSEIF press$ = CHR$(13) THEN EXIT DO 'Add up user input to varible ELSE dspl$ = dspl$ + press$ END IF END IFLOOPSELECT CASE UCASE$(dspl$)CASE "USER1" PRINT "Enter Pasword:"; usr$ = dspl$ dspl$ = "" DO LOCATE 3, 15: PRINT pss$; " "' NEW, print the ** for the varible press$ = INKEY$ IF press$ <THEN> 0 THEN sb = LEN(dspl$) Ndspl$ = MID$(dspl$, 1, (sb - 1)) Npss$ = MID$(pss$, 1, (sb - 1)) 'NEW, Subtract *** dspl$ = Ndspl$ pss$ = Npss$ 'Restore the *** ELSEIF press$ = CHR$(13) THEN EXIT DO ELSE dspl$ = dspl$ + press$ pss$ = pss$ + "*" 'NEW, calculate how many *** END IF END IF LOOP IF UCASE$(dspl$) = "ENTER" THEN PRINT "Welcome to our servers, "; usr$; "!" PRINT "Press any key to end..." SLEEP END ELSE PRINT "Username and password to not compute!" PRINT "Press any key do end..." SLEEP END END IFCASE "ADMIN" PRINT "Enter Pasword:"; usr$ = dspl$ dspl$ = "" DO LOCATE 3, 15: PRINT pss$; " " press$ = INKEY$ IF press$ <THEN> 0 THEN sb = LEN(dspl$) Ndspl$ = MID$(dspl$, 1, (sb - 1)) Npss$ = MID$(pss$, 1, (sb - 1)) dspl$ = Ndspl$ pss$ = Npss$ ELSEIF press$ = CHR$(13) THEN EXIT DO ELSE dspl$ = dspl$ + press$ pss$ = pss$ + "*" END IF END IF LOOP IF UCASE$(dspl$) = "LETMEIN" THEN PRINT "Welcome to our servers, "; usr$; "!" PRINT "Press any key to end..." SLEEP END ELSE PRINT "Username and password do not compute!" PRINT "Press any key to end..." SLEEP END END IFCASE ELSE PRINT "No user under that name: Try again..." PRINT "Press any key to end..." SLEEP ENDEND SELECT
Statistics: Posted by Seb McClouth — Sat Jan 26, 2008 1:17 pm
Statistics: Posted by Sinuvoid — Fri Jan 25, 2008 4:16 pm
Statistics: Posted by burger2227 — Fri Jan 25, 2008 1:39 pm
Statistics: Posted by Sinuvoid — Thu Jan 24, 2008 9:42 pm