#91310 - 2003-01-31 08:23 AM
Re: test crap of postprep - ignore
|
Jochen
KiX Supporter
   
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
|
|
Top
|
|
|
|
#91312 - 2003-01-31 10:18 AM
Re: test crap of postprep - ignore
|
Jochen
KiX Supporter
   
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
WordWrap on :
;Written By Randy Watson ;3/29/2000 ;Tweaked by Bryce Lindsay ;3/30/2000 ; ; thanks go out to Randy Watson for comming up with the original code ; that i based this on. ;-------------------------------------------------------------------- break on cls dim $Password1A[25] $Password1 = "" ;Needed to set the string variable. $Password2 = "" ;Needed to set the string variable.
Gosub GetPassword ;? $password Exit
;---------------------------- :GetPassword ;----------------------------
$xpos = 10 ;set the starting x position, for display only $ypos = 10 ;set the starting y position, for display only
;-------------------------------------------------------------- ;-----------------don't edit below this line------------------- ;--------------------------------------------------------------
$Index1 = 0 $Index2 = 0 if $password1 = "" at($xpos,$ypos) "Please enter password: " else at($xpos+1,$ypos) "Enter password again : " $case1x = 1 $case1 = 0 endif DO $Index1 = $Index1 + 1 IF $index1 > 25 cls beep $case1 = 0 $case1x = 0 goto GetPassword ENDIF :EnterPassword_BackSpace GET $Password1A[$Index1] select case $Password1A[$Index1] = chr(8) if $index1 = 1 if $password1 = "" beep goto EnterPassword_BackSpace else Beep Beep cls $password1 = "" $password2 = "" $case1 = 0 $case1x = 0 goto GetPassword endif else $index1 = $index1 - 1 $case1 = $case1 - 1 at($xpos+$case1x,$ypos+23+$case1) " " goto EnterPassword_BackSpace endif case $Password1A[$Index1] = chr(13) ;do nothing case 1 at($xpos+$case1x,$ypos+23+$case1)"*" $case1 = $case1 +1 endselect UNTIL $Password1A[$Index1] = CHR(13)
$Index1 = $Index1 - 1 ;Needed to get rid of the Carriage Return. if $index1 = 0 beep goto GetPassword endif
if $password1 = "" DO $Index2 = $Index2 + 1 $Password1 = $Password1 + $Password1A[$Index2] UNTIL $Index2 = $Index1 goto GetPassword else DO $Index2 = $Index2 + 1 $Password2 = $Password2 + $Password1A[$Index2] UNTIL $Index2 = $Index1 if $password1 = $password2 $password = $password2 $password1 = "" $password2 = "" $case1 = 0 $case1x = 0 return else at($xpos+$case1x+1,$ypos)"Password's don't match!!!" Beep Beep sleep 4 cls $password1 = "" $password2 = "" $case1 = 0 $case1x = 0 goto GetPassword endif endif
No Wordwrap :
;Written By Randy Watson ;3/29/2000 ;Tweaked by Bryce Lindsay ;3/30/2000 ; ; thanks go out to Randy Watson for comming up with the original code ; that i based this on. ;-------------------------------------------------------------------- break on cls dim $Password1A[25] $Password1 = "" ;Needed to set the string variable. $Password2 = "" ;Needed to set the string variable.
Gosub GetPassword ;? $password Exit
;---------------------------- :GetPassword ;----------------------------
$xpos = 10 ;set the starting x position, for display only $ypos = 10 ;set the starting y position, for display only
;-------------------------------------------------------------- ;-----------------don't edit below this line------------------- ;--------------------------------------------------------------
$Index1 = 0 $Index2 = 0 if $password1 = "" at($xpos,$ypos) "Please enter password: " else at($xpos+1,$ypos) "Enter password again : " $case1x = 1 $case1 = 0 endif DO $Index1 = $Index1 + 1 IF $index1 > 25 cls beep $case1 = 0 $case1x = 0 goto GetPassword ENDIF :EnterPassword_BackSpace GET $Password1A[$Index1] select case $Password1A[$Index1] = chr(8) if $index1 = 1 if $password1 = "" beep goto EnterPassword_BackSpace else Beep Beep cls $password1 = "" $password2 = "" $case1 = 0 $case1x = 0 goto GetPassword endif else $index1 = $index1 - 1 $case1 = $case1 - 1 at($xpos+$case1x,$ypos+23+$case1) " " goto EnterPassword_BackSpace endif case $Password1A[$Index1] = chr(13) ;do nothing case 1 at($xpos+$case1x,$ypos+23+$case1)"*" $case1 = $case1 +1 endselect UNTIL $Password1A[$Index1] = CHR(13)
$Index1 = $Index1 - 1 ;Needed to get rid of the Carriage Return. if $index1 = 0 beep goto GetPassword endif
if $password1 = "" DO $Index2 = $Index2 + 1 $Password1 = $Password1 + $Password1A[$Index2] UNTIL $Index2 = $Index1 goto GetPassword else DO $Index2 = $Index2 + 1 $Password2 = $Password2 + $Password1A[$Index2] UNTIL $Index2 = $Index1 if $password1 = $password2 $password = $password2 $password1 = "" $password2 = "" $case1 = 0 $case1x = 0 return else at($xpos+$case1x+1,$ypos)"Password's don't match!!!" Beep Beep sleep 4 cls $password1 = "" $password2 = "" $case1 = 0 $case1x = 0 goto GetPassword endif endif
_________________________
|
|
Top
|
|
|
|
#91316 - 2003-01-31 11:37 AM
Re: test crap of postprep - ignore
|
Jochen
KiX Supporter
   
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
|
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
0 registered
and 884 anonymous users online.
|
|
|