Re: [U2] Simple Masking of Password Input (Universe Basic)

2011-08-18 Thread nschroth

Thanks for the put-down, oh Senior Exhaulted Programmer Mecki.
Two useful ditties were included to remind we juniors:
1) the user perspective is supreme - way too much code is generated by
slick programmers with total disregard for the user experience.  
2) I did learn this morning that the backspace did not work and must be
addressed.

B.T.W, this is a simple enhancement request to our application login, and it
would be huge overkill to write a whole line-editor :-(

It is just a shame that U2 does not have a built-in function for this (like
many other languages).


Mecki Foerthmann wrote:
 
 When I was a Junior programmer I wrote pretty much the same piece of code.
 Unfortunately the users hated it!
 For the sake of displaying something when they typed a password they 
 lost the ability to correct typing mistakes.
 Because with INPUT,1 the Backspace key doesn't work!
 So I had to go back to the drawing board and eventually ended up writing 
 a Line Editor ;-).
 
 On 17/08/2011 18:15, nschroth wrote:
 Thanks for all the suggestions.  I went with a variation, using ECHO
 OFF/ON
 and and specific screen position for the input.  Had problems detecting
 CHAR(13). Learned that INPUT @ screws up things, so utilized the CRT@ for
 positioning.  I'll look into adding backspace handling next. Here is what
 I
 ended up with:

 PROMPT ''
 INCHAR='X'
 PASSWD=''
 CRT @(0,5):'Enter Password: ':
 ECHO OFF
 POS=16
 LOOP UNTIL INCHAR=''
 CRT @(POS,5):
 INPUT INCHAR,1:
 PASSWD:=INCHAR
 CRT @(POS,5):'*'
 POS+=1
 REPEAT
 ECHO ON



 Israel, John R. wrote:
 That's actually pretty good!


 John Israel
 Senior Programmer/Analyst
 Dayton Superior Corporation
 1125 Byers Road
 Miamisburg, OH  45342

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Mark Eastwood
 Sent: Tuesday, August 16, 2011 3:43 PM
 To: U2 Users List
 Subject: Re: [U2] Simple Masking of Password Input (Universe Basic)

 Just a quick sample

PROMPT ''
PW=''
ECHO OFF
LOOP
   INPUT X,1:
   IF X = '' THEN EXIT
   IF X THEN PRINT '*':
   PW := X
REPEAT
ECHO ON
PRINT
PRINT PW


 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of nschroth
 Sent: Tuesday, August 16, 2011 1:52 PM
 To: u2-users@listserver.u2ug.org
 Subject: [U2] Simple Masking of Password Input (Universe Basic)


 Does anyone have a simple routine for entering a password and only
 displaying an asterisk for the character entered?
 --
 View this message in context:
 http://old.nabble.com/Simple-Masking-of-Password-Input-%28Universe-Basic
 %29-tp32274238p32274238.html
 Sent from the U2 - Users mailing list archive at Nabble.com.

 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users

 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users


 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 

-- 
View this message in context: 
http://old.nabble.com/Simple-Masking-of-Password-Input-%28Universe-Basic%29-tp32274238p32287557.html
Sent from the U2 - Users mailing list archive at Nabble.com.

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Simple Masking of Password Input (Universe Basic)

2011-08-18 Thread nschroth

Andy -
Simple and right on point.  Thanks
Nelson


andy baum-2 wrote:
 
 How about
 
        PASSWD = ''
        LOOP
           CHR = KEYIN()
        UNTIL CHR = CHAR(13) DO
           IF CHR # CHAR(8) THEN
              CRT *:
              PASSWD := CHR
           END ELSE
              CRT CHAR(8):' ':CHAR(8):
              PASSWD = PASSWD[1,LEN(PASSWD)-1]
           END
        REPEAT
        CRT
        CRT PASSWD
     END
 
 HTH,
 Andy
 
 
 
 From: nschroth ngschr...@yahoo.com
 To: u2-users@listserver.u2ug.org
 Sent: Tuesday, 16 August 2011, 19:51
 Subject: [U2]  Simple Masking of Password Input (Universe Basic)
 
 
 Does anyone have a simple routine for entering a password and only
 displaying
 an asterisk for the character entered?
 -- 
 View this message in context:
 http://old.nabble.com/Simple-Masking-of-Password-Input-%28Universe-Basic%29-tp32274238p32274238.html
 Sent from the U2 - Users mailing list archive at Nabble.com.
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 

-- 
View this message in context: 
http://old.nabble.com/Simple-Masking-of-Password-Input-%28Universe-Basic%29-tp32274238p32287674.html
Sent from the U2 - Users mailing list archive at Nabble.com.

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Simple Masking of Password Input (Universe Basic)

2011-08-18 Thread Charlie Noah
Try INPUT X,-1 to see if anything is in the input buffer, then KEYIN() 
to get a single keystroke. That will get the backspace. Depending on 
your needs, you may need to check the input buffer because KEYIN will 
sit there until the cows come home if there's nothing there. This is 
great (with a napping timed loop) for detecting multi-keystroke 
sequences such as function keys. It's been a number of years since I've 
worked with UV, so I don't remember whether it returns the actual 
keystroke or the ASCII value.


Regards,
Charlie Noah

On 08-18-2011 8:56 AM, nschroth wrote:

Thanks for the put-down, oh Senior Exhaulted Programmer Mecki.
Two useful ditties were included to remind we juniors:
1) the user perspective is supreme - way too much code is generated by
slick programmers with total disregard for the user experience.
2) I did learn this morning that the backspace did not work and must be
addressed.

B.T.W, this is a simple enhancement request to our application login, and it
would be huge overkill to write a whole line-editor :-(

It is just a shame that U2 does not have a built-in function for this (like
many other languages).


Mecki Foerthmann wrote:

When I was a Junior programmer I wrote pretty much the same piece of code.
Unfortunately the users hated it!
For the sake of displaying something when they typed a password they
lost the ability to correct typing mistakes.
Because with INPUT,1 the Backspace key doesn't work!
So I had to go back to the drawing board and eventually ended up writing
a Line Editor ;-).

On 17/08/2011 18:15, nschroth wrote:

Thanks for all the suggestions.  I went with a variation, using ECHO
OFF/ON
and and specific screen position for the input.  Had problems detecting
CHAR(13). Learned that INPUT @ screws up things, so utilized the CRT@ for
positioning.  I'll look into adding backspace handling next. Here is what
I
ended up with:

PROMPT ''
INCHAR='X'
PASSWD=''
CRT @(0,5):'Enter Password: ':
ECHO OFF
POS=16
LOOP UNTIL INCHAR=''
CRT @(POS,5):
INPUT INCHAR,1:
PASSWD:=INCHAR
CRT @(POS,5):'*'
POS+=1
REPEAT
ECHO ON



Israel, John R. wrote:

That's actually pretty good!


John Israel
Senior Programmer/Analyst
Dayton Superior Corporation
1125 Byers Road
Miamisburg, OH  45342

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Mark Eastwood
Sent: Tuesday, August 16, 2011 3:43 PM
To: U2 Users List
Subject: Re: [U2] Simple Masking of Password Input (Universe Basic)

Just a quick sample

PROMPT ''
PW=''
ECHO OFF
LOOP
   INPUT X,1:
   IF X = '' THEN EXIT
   IF X THEN PRINT '*':
   PW := X
REPEAT
ECHO ON
PRINT
PRINT PW


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of nschroth
Sent: Tuesday, August 16, 2011 1:52 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Simple Masking of Password Input (Universe Basic)


Does anyone have a simple routine for entering a password and only
displaying an asterisk for the character entered?
--
View this message in context:
http://old.nabble.com/Simple-Masking-of-Password-Input-%28Universe-Basic
%29-tp32274238p32274238.html
Sent from the U2 - Users mailing list archive at Nabble.com.

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Simple Masking of Password Input (Universe Basic)

2011-08-18 Thread Rex Gozar
Displays asterisks for characters entered.  Displays extra asterisks
when password is less than seven characters.  Enjoy.

rex


  SUBROUTINE GET.PASSWD(RESPONSE)
* PASSWORD INPUT ROUTINE
**
  EQU BS TO CHAR(8)
  EQU CR TO CHAR(13)
  BUFFER = SPACE(255)
  BUFPTR = 0
  PROMPT ''
  LOOP
 C = KEYIN()
  UNTIL C EQ CR DO
 IF C EQ BS THEN
IF 0 LT BUFPTR THEN
   DISPLAY BS: :BS:
END
BUFPTR -= 1
IF BUFPTR LT 0 THEN BUFPTR = 0
 END ELSE
BUFPTR += 1
IF 255 LT BUFPTR THEN BUFPTR = 255
BUFFER[BUFPTR,1] = C
DISPLAY *:
 END
  REPEAT
  PADCNT = 7 - BUFPTR
  IF 0 LT PADCNT THEN
 DISPLAY STR(*, PADCNT):
  END
  RESPONSE = BUFFER[1,BUFPTR]
  RETURN
   END

On Tue, Aug 16, 2011 at 2:51 PM, nschroth ngschr...@yahoo.com wrote:

 Does anyone have a simple routine for entering a password and only displaying
 an asterisk for the character entered?

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Simple Masking of Password Input (Universe Basic)

2011-08-17 Thread andy baum
Another version using !GET.KEY that just beeps if invalid characters are 
entered. Should be OK in most instances although !GET.KEY is not as good as the 
PI/Open implementation and does have some foibles,
 
$INCLUDE UNIVERSE.INCLUDE GTI.FNKEYS.IH

   PASSWD = ''
   LOOP
  CALL !GET.KEY(CHR, CODE)
   UNTIL CODE = FK$FIN DO
  BEGIN CASE
 CASE CODE = 0
    CRT *:
    PASSWD := CHR
 CASE CODE = FK$BSP AND PASSWD # ''
    CRT CHR:' ':CHR:
    PASSWD = PASSWD[1,LEN(PASSWD)-1]
 CASE 1
    CRT @SYS.BELL:
  END CASE
   REPEAT
   CRT
   CRT PASSWD
 
Cheers,
Andy

From: Bob Wyatt bwyatt_...@comcast.net
To: 'U2 Users List' u2-users@listserver.u2ug.org
Sent: Wednesday, 17 August 2011, 3:59
Subject: Re: [U2] Simple Masking of Password Input (Universe Basic)

There was nothing in the request about validating the keys entered... So
even if a backspace is pressed, throw the *...

If there is a desire to test the validity of the character entered (it is
within the allowed character range of this password - I.E., alpha-numeric or
standard special characters [presumably]), I would probably use the
!GET.KEY subroutine and presumably test the key entered against whichever is
shorter  - valid or invalid keys. If an errant character type is detected,
advise the operator accordingly, wipe out the password, and make the
operator retype from the beginning. This is not a test of the nth character
entered compared to the nth character of the password - just whether the key
pressed is valid; if it is valid, output the *.

The documentation is a little lacking, but I believe that !GET.KEY does not
do any of the limited character handling that KEYIN() will do.
However, speedy does not come to mind when I think of everything entailed in
doing this; the longer the password required, the less speedy it shall be.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of andy baum
Sent: Tuesday, August 16, 2011 7:09 PM
To: U2 Users List
Subject: Re: [U2] Simple Masking of Password Input (Universe Basic)

Slight amendment in case your positioned in middle of screen.

       PASSWD = ''
       LOOP
          CHR = KEYIN()
       UNTIL CHR = CHAR(13) DO
          BEGIN CASE
             CASE CHR # CHAR(8)
                CRT *:
                PASSWD := CHR
             CASE PASSWD # ''
                CRT CHAR(8):' ':CHAR(8):
                PASSWD = PASSWD[1,LEN(PASSWD)-1]
          END CASE
       REPEAT
       CRT
       CRT PASSWD

Cheers,
Andy



From: nschroth ngschr...@yahoo.com
To: u2-users@listserver.u2ug.org
Sent: Tuesday, 16 August 2011, 19:51
Subject: [U2]  Simple Masking of Password Input (Universe Basic)


Does anyone have a simple routine for entering a password and only
displaying an asterisk for the character entered?
--
View this message in context:
http://old.nabble.com/Simple-Masking-of-Password-Input-%28Universe-Basic%29-
tp32274238p32274238.html
Sent from the U2 - Users mailing list archive at Nabble.com.

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Simple Masking of Password Input (Universe Basic)

2011-08-17 Thread Mecki Foerthmann

When I was a Junior programmer I wrote pretty much the same piece of code.
Unfortunately the users hated it!
For the sake of displaying something when they typed a password they 
lost the ability to correct typing mistakes.

Because with INPUT,1 the Backspace key doesn't work!
So I had to go back to the drawing board and eventually ended up writing 
a Line Editor ;-).


On 17/08/2011 18:15, nschroth wrote:

Thanks for all the suggestions.  I went with a variation, using ECHO OFF/ON
and and specific screen position for the input.  Had problems detecting
CHAR(13). Learned that INPUT @ screws up things, so utilized the CRT@ for
positioning.  I'll look into adding backspace handling next. Here is what I
ended up with:

PROMPT ''
INCHAR='X'
PASSWD=''
CRT @(0,5):'Enter Password: ':
ECHO OFF
POS=16
LOOP UNTIL INCHAR=''
CRT @(POS,5):
INPUT INCHAR,1:
PASSWD:=INCHAR
CRT @(POS,5):'*'
POS+=1
REPEAT
ECHO ON



Israel, John R. wrote:

That's actually pretty good!


John Israel
Senior Programmer/Analyst
Dayton Superior Corporation
1125 Byers Road
Miamisburg, OH  45342

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Mark Eastwood
Sent: Tuesday, August 16, 2011 3:43 PM
To: U2 Users List
Subject: Re: [U2] Simple Masking of Password Input (Universe Basic)

Just a quick sample

   PROMPT ''
   PW=''
   ECHO OFF
   LOOP
  INPUT X,1:
  IF X = '' THEN EXIT
  IF X THEN PRINT '*':
  PW := X
   REPEAT
   ECHO ON
   PRINT
   PRINT PW


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of nschroth
Sent: Tuesday, August 16, 2011 1:52 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Simple Masking of Password Input (Universe Basic)


Does anyone have a simple routine for entering a password and only
displaying an asterisk for the character entered?
--
View this message in context:
http://old.nabble.com/Simple-Masking-of-Password-Input-%28Universe-Basic
%29-tp32274238p32274238.html
Sent from the U2 - Users mailing list archive at Nabble.com.

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


[U2] Simple Masking of Password Input (Universe Basic)

2011-08-16 Thread nschroth

Does anyone have a simple routine for entering a password and only displaying
an asterisk for the character entered?
-- 
View this message in context: 
http://old.nabble.com/Simple-Masking-of-Password-Input-%28Universe-Basic%29-tp32274238p32274238.html
Sent from the U2 - Users mailing list archive at Nabble.com.

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Simple Masking of Password Input (Universe Basic)

2011-08-16 Thread Holt, Jake
Not exactly what you are asking for but:

PRINT ENTER YOUR PASSWORD
HUSH ON
INPUT PWD
HUSH OFF
PRINT YOU ENTERED::PWD

Works to hide the input

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of nschroth
Sent: Tuesday, August 16, 2011 1:52 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Simple Masking of Password Input (Universe Basic)


Does anyone have a simple routine for entering a password and only
displaying an asterisk for the character entered?
--
View this message in context:
http://old.nabble.com/Simple-Masking-of-Password-Input-%28Universe-Basic
%29-tp32274238p32274238.html
Sent from the U2 - Users mailing list archive at Nabble.com.

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Simple Masking of Password Input (Universe Basic)

2011-08-16 Thread Mark Eastwood
Just a quick sample

  PROMPT ''
  PW=''
  ECHO OFF
  LOOP
 INPUT X,1:
 IF X = '' THEN EXIT
 IF X THEN PRINT '*':
 PW := X
  REPEAT
  ECHO ON
  PRINT
  PRINT PW


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of nschroth
Sent: Tuesday, August 16, 2011 1:52 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Simple Masking of Password Input (Universe Basic)


Does anyone have a simple routine for entering a password and only
displaying an asterisk for the character entered?
--
View this message in context:
http://old.nabble.com/Simple-Masking-of-Password-Input-%28Universe-Basic
%29-tp32274238p32274238.html
Sent from the U2 - Users mailing list archive at Nabble.com.

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Simple Masking of Password Input (Universe Basic)

2011-08-16 Thread Israel, John R.
That's actually pretty good!


John Israel
Senior Programmer/Analyst
Dayton Superior Corporation
1125 Byers Road
Miamisburg, OH  45342

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Mark Eastwood
Sent: Tuesday, August 16, 2011 3:43 PM
To: U2 Users List
Subject: Re: [U2] Simple Masking of Password Input (Universe Basic)

Just a quick sample

  PROMPT ''
  PW=''
  ECHO OFF
  LOOP
 INPUT X,1:
 IF X = '' THEN EXIT
 IF X THEN PRINT '*':
 PW := X
  REPEAT
  ECHO ON
  PRINT
  PRINT PW


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of nschroth
Sent: Tuesday, August 16, 2011 1:52 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Simple Masking of Password Input (Universe Basic)


Does anyone have a simple routine for entering a password and only
displaying an asterisk for the character entered?
--
View this message in context:
http://old.nabble.com/Simple-Masking-of-Password-Input-%28Universe-Basic
%29-tp32274238p32274238.html
Sent from the U2 - Users mailing list archive at Nabble.com.

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Simple Masking of Password Input (Universe Basic)

2011-08-16 Thread Larry Hiscock
How about backspacing to correct mistakes?  ;-)

Larry Hiscock
Western Computer Services


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Israel, John R.
Sent: Tuesday, August 16, 2011 12:54 PM
To: 'U2 Users List'
Subject: Re: [U2] Simple Masking of Password Input (Universe Basic)

That's actually pretty good!


John Israel
Senior Programmer/Analyst
Dayton Superior Corporation
1125 Byers Road
Miamisburg, OH  45342

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Mark Eastwood
Sent: Tuesday, August 16, 2011 3:43 PM
To: U2 Users List
Subject: Re: [U2] Simple Masking of Password Input (Universe Basic)

Just a quick sample

  PROMPT ''
  PW=''
  ECHO OFF
  LOOP
 INPUT X,1:
 IF X = '' THEN EXIT
 IF X THEN PRINT '*':
 PW := X
  REPEAT
  ECHO ON
  PRINT
  PRINT PW


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of nschroth
Sent: Tuesday, August 16, 2011 1:52 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Simple Masking of Password Input (Universe Basic)


Does anyone have a simple routine for entering a password and only
displaying an asterisk for the character entered?
--
View this message in context:
http://old.nabble.com/Simple-Masking-of-Password-Input-%28Universe-Basic
%29-tp32274238p32274238.html
Sent from the U2 - Users mailing list archive at Nabble.com.

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Simple Masking of Password Input (Universe Basic)

2011-08-16 Thread andy baum
How about

       PASSWD = ''
       LOOP
          CHR = KEYIN()
       UNTIL CHR = CHAR(13) DO
          IF CHR # CHAR(8) THEN
             CRT *:
             PASSWD := CHR
          END ELSE
             CRT CHAR(8):' ':CHAR(8):
             PASSWD = PASSWD[1,LEN(PASSWD)-1]
          END
       REPEAT
       CRT
       CRT PASSWD
    END

HTH,
Andy



From: nschroth ngschr...@yahoo.com
To: u2-users@listserver.u2ug.org
Sent: Tuesday, 16 August 2011, 19:51
Subject: [U2]  Simple Masking of Password Input (Universe Basic)


Does anyone have a simple routine for entering a password and only displaying
an asterisk for the character entered?
-- 
View this message in context: 
http://old.nabble.com/Simple-Masking-of-Password-Input-%28Universe-Basic%29-tp32274238p32274238.html
Sent from the U2 - Users mailing list archive at Nabble.com.

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Simple Masking of Password Input (Universe Basic)

2011-08-16 Thread andy baum
Slight amendment in case your positioned in middle of screen.

       PASSWD = ''
       LOOP
          CHR = KEYIN()
       UNTIL CHR = CHAR(13) DO
          BEGIN CASE
             CASE CHR # CHAR(8)
                CRT *:
                PASSWD := CHR
             CASE PASSWD # ''
                CRT CHAR(8):' ':CHAR(8):
                PASSWD = PASSWD[1,LEN(PASSWD)-1]
          END CASE
       REPEAT
       CRT
       CRT PASSWD

Cheers,
Andy



From: nschroth ngschr...@yahoo.com
To: u2-users@listserver.u2ug.org
Sent: Tuesday, 16 August 2011, 19:51
Subject: [U2]  Simple Masking of Password Input (Universe Basic)


Does anyone have a simple routine for entering a password and only displaying
an asterisk for the character entered?
-- 
View this message in context: 
http://old.nabble.com/Simple-Masking-of-Password-Input-%28Universe-Basic%29-tp32274238p32274238.html
Sent from the U2 - Users mailing list archive at Nabble.com.

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Simple Masking of Password Input (Universe Basic)

2011-08-16 Thread Keith Johnson [DATACOM]
It's not all that simple, but try


http://www.pickwiki.com/cgi-bin/wiki.pl?FieldInput

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Simple Masking of Password Input (Universe Basic)

2011-08-16 Thread Bob Wyatt
There was nothing in the request about validating the keys entered... So
even if a backspace is pressed, throw the *...

If there is a desire to test the validity of the character entered (it is
within the allowed character range of this password - I.E., alpha-numeric or
standard special characters [presumably]), I would probably use the
!GET.KEY subroutine and presumably test the key entered against whichever is
shorter  - valid or invalid keys. If an errant character type is detected,
advise the operator accordingly, wipe out the password, and make the
operator retype from the beginning. This is not a test of the nth character
entered compared to the nth character of the password - just whether the key
pressed is valid; if it is valid, output the *.

The documentation is a little lacking, but I believe that !GET.KEY does not
do any of the limited character handling that KEYIN() will do.
However, speedy does not come to mind when I think of everything entailed in
doing this; the longer the password required, the less speedy it shall be.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of andy baum
Sent: Tuesday, August 16, 2011 7:09 PM
To: U2 Users List
Subject: Re: [U2] Simple Masking of Password Input (Universe Basic)

Slight amendment in case your positioned in middle of screen.

       PASSWD = ''
       LOOP
          CHR = KEYIN()
       UNTIL CHR = CHAR(13) DO
          BEGIN CASE
             CASE CHR # CHAR(8)
                CRT *:
                PASSWD := CHR
             CASE PASSWD # ''
                CRT CHAR(8):' ':CHAR(8):
                PASSWD = PASSWD[1,LEN(PASSWD)-1]
          END CASE
       REPEAT
       CRT
       CRT PASSWD

Cheers,
Andy



From: nschroth ngschr...@yahoo.com
To: u2-users@listserver.u2ug.org
Sent: Tuesday, 16 August 2011, 19:51
Subject: [U2]  Simple Masking of Password Input (Universe Basic)


Does anyone have a simple routine for entering a password and only
displaying an asterisk for the character entered?
--
View this message in context:
http://old.nabble.com/Simple-Masking-of-Password-Input-%28Universe-Basic%29-
tp32274238p32274238.html
Sent from the U2 - Users mailing list archive at Nabble.com.

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users