The PSION Organiser II Homepage
Forum Home Forum Home Help Help Search Search Members Members Login Login Register Register

Welcome, Guest. Please Login or Register.
Why register?
   The Psion Organiser II Forum
   User Forum
   User Post
(Moderator: Mikesan)
   Hidden PIN
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Hidden PIN  (Read 865 times)
Perry_Clarke
active Member




   
Email

Posts: 27
Hidden PIN
« on: Oct 6th, 2010, 10:00pm »
Quote Quote Modify Modify

Hi. I am writing an App that requires a PIN code to access certain program functions. The actual App itself is very straightforward but I want the entered digits of the PIN to be displayed as asterix's.  
Any ideas welcome!
 
Perry
Boris
Administrator




   
WWW

Posts: 552
Re: Hidden PIN
« Reply #1 on: Oct 7th, 2010, 1:33am »
Quote Quote Modify Modify

Ransacking my library I found....
 
PW$:(prompt$,line%,maxlen%)
LOCAL result$(20),char%
AT 1,line% :PRINT prompt$;
WHILE 1
 char%=GET
 IF char%=13 :REM <EXE>
  BREAK
 ELSEIF char%=1 :REM <ON/CLEAR>
  IF result$="" :BREAK :ENDIF
  result$=""
  IF line%<=2
   PRINT CHR$(13+line%);prompt$;
  ELSE
   PRINT CHR$(19+line%);prompt$;
  ENDIF
 ELSEIF char%=8 AND LEN(result$)>0 :REM <DEL>
  result$=LEFT$(result$,LEN(result$)-1)
  PRINT CHR$(8),CHR$(8);
 ELSEIF LEN(result$)=maxlen% or char%<32
  PRINT CHR$(16);
 ELSE
  PRINT "*";
  result$=result$+CHR$(char%)
 ENDIF
ENDWH
RETURN result$
« Last Edit: Nov 11th, 2010, 12:32pm by Boris »

Triholerahduliäöhh gugguh !! (tyrolean joy jodler)
Rough translation: There's a new build of Psi2Win!!
Email: boris[at]psion2[dot]org
Perry_Clarke
active Member




   
Email

Posts: 27
Re: Hidden PIN
« Reply #2 on: Oct 8th, 2010, 1:01pm »
Quote Quote Modify Modify

Thats fantastic, thankyou Boris.
Perry.
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

The Psion Organiser II Forum » Powered by YaBB 1 Gold - SP 1.1!
YaBB © 2000-2002,
Xnull. All Rights Reserved.
top