Silent pw entry not working - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://staging.qb64phoenix.com/forumdisplay.php?fid=10) +---- Thread: Silent pw entry not working (/showthread.php?tid=1264) |
RE: Silent pw entry not working - bplus - 12-12-2022 (12-11-2022, 09:21 PM)RhoSigma Wrote: I never understood the sense of a silent/hidden (or what ever you wanna call) input field. And there is a countermeasure for that too: https://www.mic.com/articles/101146/researchers-have-successfully-tested-a-men-in-black-style-memory-eraser RE: Silent pw entry not working - Pete - 12-12-2022 What? It's not good enough!!! Okay, try this baby out... Change pw = 0 to pw =1 to display asterisks. Code: (Select All) ' Single line keyboard routine for input. Excludes highlighting, cut, copy, paste. Well, that's enough fun for me tonight. Have to go make tacos. Yum! RE: Silent pw entry not working - Ra7eN - 12-12-2022 Code: (Select All) do RE: Silent pw entry not working - Pete - 12-12-2022 Someone once asked me "A penny for my thoughts. I replied, and they asked for change. RE: Silent pw entry not working - vince - 12-12-2022 nice job showing them how it's done, Steve. Is extendedinput included with QB64PE or not yet? RE: Silent pw entry not working - SMcNeill - 12-12-2022 (12-12-2022, 06:25 AM)vince Wrote: nice job showing them how it's done, Steve. Is extendedinput included with QB64PE or not yet? It's not, but it's part of my KeyHit library. Works with custom keyboard layouts, and unicode printing, so it's great for people with non-American keyboards. RE: Silent pw entry not working - Pete - 12-12-2022 For those of you who didn't know, Vince used to work out of U.C.L.A. until his pom poms got destroyed in a sorority barbecue. Pete RE: Silent pw entry not working - mnrvovrfc - 12-12-2022 (12-12-2022, 06:54 AM)SMcNeill Wrote: It's not, but it's part of my KeyHit library. Works with custom keyboard layouts, and unicode printing, so it's great for people with non-American keyboards.Cleverly, it's also another example of telling off those people who want QB64(PE) to support a subprogram written by the user which is like "sprintf()" in C. Somehow take that function and come up with an all-BASIC version of it that replaces "PRINT USING" most of the time. I wrote a function that randomly chooses an integer from a list. That function accepts one parameter which is a string, the contents of that string is a semicolon-separated list of values. It's because otherwise we cannot do like the extended "CHR$()" implementation in Freebasic. I have done that too and more, even one called "chrud$()" which returns an 8-character string out of a 16-digit _INTEGER64 hexadecimal value. However, to get a password and to let the user know how important it is, a function like that "ExtendedInput$" isn't necessary. Just use "INPUT$(1)" to get each character, maybe allow only backspace and [ENTER], and don't print anything that was typed. The "sudo" password requester for many Linux distros is a bit permissive IMHO. RE: Silent pw entry not working - vince - 12-12-2022 (12-12-2022, 08:37 AM)mnrvovrfc Wrote: However, to get a password and to let the user know how important it is, a function like that "ExtendedInput$" isn't necessary. Just use "INPUT$(1)" to get each character, maybe allow only backspace and [ENTER], and don't print anything that was typed. The "sudo" password requester for many Linux distros is a bit permissive IMHO. hey don't get too ahead of yourself there. Sometimes it is the better programming practice to use something that has been stress tested by our user base for YEARS now. Its results speak for themselves. You try to get too clever for your own good by spinning it yourself you end up going full Pete RE: Silent pw entry not working - Pete - 12-12-2022 ..Or end up doing it over and going full re-Pete. Two schools of thought here, and both have merit. 1) Do it yourself to build confidence in your coding ability. Whatever the style, if it works, it works. 2) Use other people's libraries and routines. Faster, hopefully proven, and you get to spend more time on other part of your project. The C/C++ community and I hear the Python community are big on telling newbies to just use libraries. I drove those C people nuts when I wanted to make a custom keyboard input routine in C/C++. I did it, but getting help was a bit of a struggle, because hardly anyone there knew anything about a non-library approach. For me, my custom keyboard routines are fun to build and always allow complete customization and flow-through events. Can't do that, no matter how much better LINE INPUT gets. Just my 2-cent, and since those pennies are from the Roman Empire Era, they're actually worth something. Pete |