locked
Is it possible to show user-input as dots? RRS feed

  • Question

  • What I mean is: Can I have the user put in some text, but have it show on the screen as dots (or even hidden) like a password input?

    ------------------------------------------------------------------------------------------

    Sunday, March 25, 2012 7:00 PM

Answers

  • Oh shoots! I've alwayz assumed programmers wanted things done on GraphicsWindows.
    Anywayz, I've done it for TextWindow as well!  \(^O^)/
    You just append the whole thing below at the end of your code; and then you can call my HiddenCLIInput() subroutine in place of native TextWindow.Read(), when you preffer not to display what's being typed.
    Optionally, you can specify HIPWMax as max input length accepted from user before invoking it.
    Result is stored in HIPWStr. Just transfer it to a safer variable of your choice; so you can call HiddenCLIInput() other times again if you need.
    You can find a sample usage in this link -> TGH751

    PS: It doesn't work well on Silverlight!

    '==============================================================='
    ' Hidden CLI Password Input '
    '==============================================================='
    
    Sub HiddenCLIInput
      '--- Accepts an input from the user w/o displaying what is being typed
      '--- Returns HIPWStr as the string typed
      '--- Accepts HIPWMax as maximum # of chars which HIPWStr can have
      
      SpecialCharsHeader()
      HiddenInputInit()
      HiddenInputLoop()
      
    EndSub
    '------------------------------------------------------------------------------------------------------------'
    Sub HiddenInputInit
      
      InitCursorX = TextWindow.CursorLeft
      InitCursorY = TextWindow.CursorTop
      
      If HIPWMax <= 0 Then    ' Max # of chars which can be accepted from user
        HIPWMax = 255         ' If HIPWMax is undetermined, use default 255
      EndIf
      
      HIPWKey     = ""    ' Typed char to be analysed
      HIPWStr     = ""    ' Password result formed outta accepted HIPWKey chars
      HiddenChars = ""    ' Which HIPWStrDisplay derives from
      HiddenChar  = STAR  ' Char displayed in place of what is being typed
      EnterKey    = CR    ' Key to confirm the input
      DeleteKey   = BS    ' Key to delete last char stored in HIPWStr
      
      For num = 1 To HIPWMax
        HiddenChars = HiddenChars + HiddenChar
      EndFor
      
    EndSub
    '------------------------------------------------------------------------------------------------------------'
    Sub HiddenInputLoop
      
      While HIPWKey <> EnterKey
        HIPWKey = TextWindow.ReadKey()   ' Waits next key to be hit
        HiddenInputParse()    ' Decides if it can be accept
        HiddenInputHide()     ' Replaces typed by HiddenChars
      EndWhile
      
    EndSub
    '------------------------------------------------------------------------------------------------------------'
    Sub HiddenInputParse
      
      HIPWKeyCode = Text.GetCharacterCode(HIPWKey)
      If HIPWKeyCode >= 32 Then                     ' Tests if printable
        HIPWStr   = Text.Append(HIPWStr  HIPWKey)   ' Creates PW string
      EndIf
      
      HIPWStrLen = Text.GetLength(HIPWStr) 
      If HIPWStrLen > HIPWMax Then          ' Checks if size passed limit
        HIPWKey  = DeleteKey
      EndIf
      
      If HIPWKey = DeleteKey Then   ' Deletes last char typed
        TextWindow.Write(SPC + BS + BS + SPC + BS + BEL)
        HIPWStr  = Text.GetSubText(HIPWStr  1  HIPWStrLen-1)
      EndIf
      
    EndSub
    '------------------------------------------------------------------------------------------------------------'
    Sub HiddenInputHide
      
      HIPWStrLen = Text.GetLength(HIPWStr)
      HIPWStrDisplay = Text.GetSubText(HiddenChars  1  HIPWStrLen)
      
      TextWindow.CursorLeft = InitCursorX   ' Repositions cursor at the beginning
      TextWindow.CursorTop  = InitCursorY
      TextWindow.Write(HIPWStrDisplay)      ' to display HiddenChars
      
    EndSub
    '------------------------------------------------------------------------------------------------------------'
    
    '==============================================================='
    ' Constant Header Includes '
    '==============================================================='
    
    Sub SpecialCharsHeader
      ' --- Initializes constants for special control characters in ASCII code:
      
      BEL= Text.GetCharacter   ( 7)   ' Makes internal PC-Speaker buzz
      BS=  Text.GetCharacter   ( 8)   ' Backspace
      TAB= Text.GetCharacter   ( 9)   ' Horizontal Tabulation (HT)
      LF=  Text.GetCharacter   (10)   ' Line-Feed (jumps a line)
      CR=  Text.GetCharacter   (13)   ' Carriage Return
      ESC= Text.GetCharacter   (27)   ' Escape Key
      CRS= Text.GetCharacter   (22)   ' Cursor
      ARW= Text.GetCharacter   (26)   ' Right Arrow
      QUO= Text.GetCharacter   (34)   ' Double Quotation Mark
      SQU= Text.GetCharacter  (166)   ' Half Vertical Rectangle
      APO=                     "'"    ' Apostrophe
      DOT=                     "."    ' Period
      COMMA=                   ","    ' Comma
      STAR=                    "*"    ' Asterisk
      SPC=                     " "    ' SPaCe
      
    EndSub
    '------------------------------------------------------------------------------------------------------------'
    • Edited by GoToLoopEditor Wednesday, March 28, 2012 3:07 AM Silverlight warning
    • Marked as answer by Joman Mied Monday, August 6, 2012 6:22 AM
    Wednesday, March 28, 2012 3:04 AM
    Answerer

All replies

  • Hey Joman Mied!
    I was going to just give you some ideas, but then I've changed my mind and decided to code one. Boy, that was hard to pull out!
    Although I've succeeded doing so, there are some setbacks and even a crashing bug!
    Every time an incorrect combination of an accent + a letter is typed inside password box, it demolishes the program very badly!
    Other problems are no means to use Backspace, Delete, Arrows and other text control keys.  [± _ ±]  At least I've programmed "F1" to clear password boxfield!
    I've left many comments throughout the code, so anyone can try to understand it.
    Well, here it is: THP414-1

    '**********************************************************************************'
    ' Hidden Password Input '
    '**********************************************************************************'

    GraphicsWindow.Title = "Hidden Password Input"
    GraphicsWindow.BackgroundColor = "Black"
    CreateGUILogin()

    Controls.ButtonClicked   = ButtonClicked
    Controls.TextTyped       = TextField
    GraphicsWindow.KeyDown   = InKey
    GraphicsWindow.MouseDown = MouseButton

    HidePass = "True"   ' "True" to hide password boxfield; any other value to display it

    '**********************************************************************************'
    ' Login/Pasword Request Init: '
    '**********************************************************************************'

    Init:

    PWStr    = ""   ' Stores printable chars typed within password txtboxfield
    Asterisk = ""   ' What is displayed instead of PWStr
    Asterisks= ""   ' From which Asterisk gets HideChar
    Button   = ""   ' Last button pressed
    TextBox  = ""   ' Last typed boxfield used

    HideCharCode = 164   ' Character code which replaces password char display
    HideChar = Text.GetCharacter(HideCharCode)
    For num = 1 To 100
      Asterisks = Asterisks + HideChar
    EndFor

    Controls.SetTextBoxText(LoginBox "")  ' Clears txtboxfields
    Controls.SetTextBoxText(PassBox  "")

    While Stack.GetCount("PWChar") > 0    ' Empties typed chars buffer
      Stack.PopValue("PWChar")
    EndWhile

    '**********************************************************************************'
    ' Login/Pasword Request Loop: '
    '**********************************************************************************'

    While Button <> "Confirm"   ' Repeats till "Confirm" button is selected
     
      If Stack.GetCount("PWChar") > 0 And HidePass Then
        PassChar = Stack.PopValue("PWChar")   'Retrieves next char typed
        TrimPassChar()   ' Removes all HideChar present in PassChar
        ParsePassChar()  ' Saves all printable chars from PassChar into PWStr
        HidePassword()   ' Fill up password boxfield w/ as many HideChar as PWStr
      EndIf
     
      Program.Delay(5)   ' A quick delay to avoid heating up CPU
     
    EndWhile

    Button = ""

    '**********************************************************************************'
    ' Login/Pasword Request Result: '
    '**********************************************************************************'

    Login = Controls.GetTextBoxText(LoginBox)

    If HidePass Then
      PassWord = PWStr
    Else
      PassWord = Controls.GetTextBoxText(PassBox)
    EndIf

    RevealPassword()

    MouseClicked = "False"
    While MouseClicked = "False"   ' Waits for mousebutton to restart program
      Program.Delay(100)
    EndWhile
    Sound.PlayChimes()

    Goto Init

    '*********************************************************************************'

    '------------------------------------------------------------------------------------------------------'
    Sub ButtonClicked
     
      Button = Controls.GetButtonCaption(Controls.LastClickedButton)
      Sound.PlayClick()
     
    EndSub
    '------------------------------------------------------------------------------------------------------'
    Sub TextField
     
      TextBox  = Controls.LastTypedTextBox
     
      If TextBox = PassBox And HidePass Then
        Stack.PushValue("PWChar"  Controls.GetTextBoxText(PassBox))
      EndIf
     
    EndSub
    '------------------------------------------------------------------------------------------------------'
    Sub InKey
     
      Key = GraphicsWindow.LastKey
     
      If Key = "Escape" Then
        Sound.PlayChimeAndWait()
        Program.End()
      EndIf
     
      If TextBox = PassBox Then   ' Clears password boxfield
        If Key = "F1" Then
          PWStr = ""
          Controls.SetTextBoxText(PassBox  "")
        EndIf
      EndIf
     
    EndSub
    '------------------------------------------------------------------------------------------------------'
    Sub MouseButton
     
      MouseClicked = "True"
     
    EndSub
    '------------------------------------------------------------------------------------------------------'
    Sub CreateGUILogin
     
      GraphicsWindow.BrushColor = "SlateBlue"
      GraphicsWindow.DrawText(30,100  "Login:")
      GraphicsWindow.DrawText(30,130  "Password:")
     
      GraphicsWindow.BrushColor = "Green"
      LoginBox = Controls.AddTextBox(120,100)
      PassBox  = Controls.AddTextBox(120,130)
     
      GraphicsWindow.BrushColor = "Red"
      Controls.AddButton("Confirm"  170,170)
     
    EndSub
    '------------------------------------------------------------------------------------------------------'
    Sub TrimPassChar
     
      While Text.StartsWith(PassChar  HideChar)    ' Removes from left
        PassChar = Text.GetSubTextToEnd(PassChar  2)
      EndWhile
     
      While Text.EndsWith  (PassChar  HideChar)    ' Removes from right
        PassChar = Text.GetSubText(PassChar  1  Text.GetLength(PassChar)-1)
      EndWhile
     
    EndSub
    '------------------------------------------------------------------------------------------------------'
    Sub ParsePassChar
     
      Unicode  = Text.GetCharacterCode(PassChar)
     
      If Unicode >= 32 And Unicode <> HideCharCode Then   ' Test if printable
        PWStr = Text.Append(PWStr PassChar)    ' Creates typed password chars
      EndIf
     
    EndSub
    '------------------------------------------------------------------------------------------------------'
    Sub HidePassword
     
      Asterisk = Text.GetSubText(Asterisks  1  Text.GetLength(PWStr))
      Controls.SetTextBoxText(PassBox  Asterisk)
     
    EndSub
    '------------------------------------------------------------------------------------------------------'
    Sub RevealPassword
     
      Controls.SetTextBoxText(PassBox  PassWord)
      Sound.PlayBellRing()
     
    EndSub
    '------------------------------------------------------------------------------------------------------'

    • Edited by GoToLoopEditor Tuesday, March 27, 2012 5:46 AM Use Bullets
    Monday, March 26, 2012 7:42 AM
    Answerer
  • Thank you for the idea, GoToLoop, but I need a more simple version of that, as I am using TextWindow.

    Here is my (spaghetti) script (because I am using GoTo in a few different areas):

    TextWindowPlus.Top = 0
    TextWindowPlus.Left = 0
    TextWindowPlus.Height = 60
    TextWindowPlus.Width = 157
    TextWindow.WriteLine("Welcome to Joman's computer! Press '1' to sign-up; press '2' to sign-in; or press '3' to exit.")
    opt = TextWindow.Read()
    If opt = "1" Then
      begin:
      TextWindow.Write("Please enter your first name: ")
      name = TextWindow.Read()
      TextWindow.Write("Please create a username: ")
      usrnm = TextWindow.Read()
      TextWindow.Write("Please create a password: ") '<--- This needs to be converted
      pass = TextWindow.Read()
      File.InsertLine("C:\Small Basic\Login Info.txt", "1", name)
      File.InsertLine("C:\Small Basic\Login Info.txt", "2", usrnm)
      File.InsertLine("C:\Small Basic\Login Info.txt", "3", pass)
      TextWindow.WriteLine("Press 1 if you would like to make another account; press 2 if you want to sign-in; or press 3 to quit program.")
      opt2 = TextWindow.Read()
      If opt2 = "1" Then
        Goto begin
      ElseIf opt2 = "2" then
        Goto begin2
      Else
        Goto begin3
      EndIf
    ElseIf opt = "2" then
      begin2:
      TextWindow.Write("Please enter your name: ")
      name2 = TextWindow.Read()
      If name2 = File.ReadLine("C:\Small Basic\Login Info.txt", "1") then
        TextWindow.Write("Please enter username: ")
        usrnm2 = TextWindow.Read()
        TextWindow.Write("Please enter your password: ") '<--- This too needs to be converted
          pass2 = TextWindow.Read()
          If usrnm2 = File.ReadLine("C:\Small Basic\Login Info.txt", "2") and pass2 = File.ReadLine("C:\Small Basic\Login Info.txt", "3") then
            TextWindow.Write("Hi "+ name2 + ", your access is granted!")
            Program.Delay(2000)
            Program.End()
          Else
            TextWindow.Write("Sorry, wrong credentials.")
            Program.Delay(5000)
            Program.End()
          EndIf
      ElseIf name2 = File.ReadLine("C:\Small Basic\Login Info.txt", "4") then
        TextWindow.Write("Please enter username: ")
        usrnm2 = TextWindow.Read()
        TextWindow.Write("Please enter your password: ") '<--- This too needs to be converted
          pass2 = TextWindow.Read()
          If usrnm2 = File.ReadLine("C:\Small Basic\Login Info.txt", "5") and pass2 = File.ReadLine("C:\Small Basic\Login Info.txt", "6") then
            TextWindow.Write("Hi "+ name2 + ", your access is granted!")
            Program.Delay(2000)
            Program.End()
          Else
            TextWindow.Write("Sorry, wrong credentials.")
            Program.Delay(5000)
            Program.End()
            EndIf
        ElseIf name2 = File.ReadLine("C:\Small Basic\Login Info.txt", "7") then
          TextWindow.Write("Please enter username: ")
          usrnm2 = TextWindow.Read()
          TextWindow.Write("Please enter your password: ") '<--- This too needs to be converted
            pass2 = TextWindow.Read()
            If usrnm2 = File.ReadLine("C:\Small Basic\Login Info.txt", "8") and pass2 = File.ReadLine("C:\Small Basic\Login Info.txt", "9") then
             TextWindow.Write("Hi "+ name2 + ", your access is granted!")
              Program.Delay(2000)
              Program.End()
            Else
              TextWindow.Write("Sorry, wrong credentials.")
              Program.Delay(5000)
              Program.End()
            EndIf
        ElseIf name2 = File.ReadLine("C:\Small Basic\Login Info.txt", "10") then
          TextWindow.Write("Please enter username: ")
          usrnm2 = TextWindow.Read()
          TextWindow.Write("Please enter your password: ") '<--- This too needs to be converted
            pass2 = TextWindow.Read()
         If usrnm2 = File.ReadLine("C:\Small Basic\Login Info.txt", "11") and pass2 = File.ReadLine("C:\Small Basic\Login Info.txt", "12") then
             TextWindow.Write("Hi "+ name2 + ", your access is granted!")
              Program.Delay(2000)
              Program.End()
            Else
              TextWindow.Write("Sorry, wrong credentials.")
              Program.Delay(5000)
              Program.End()
            EndIf
        EndIf
      ElseIf opt = "3" then
        begin3:
        Program.End()
    EndIf

    *End of script*

    Sorry if it is confusing, but I did the best I could not knowing how to use the 'While' loop.

    Also, I am not used to using GraphicsWindow.

    If you can help, much appreciated! If you can't, thanks for your help so far, and I will mess around with it some more and see what I come up with. :)


    ------------------------------------------------------------------------------------------


    • Edited by Joman Mied Tuesday, March 27, 2012 1:11 AM 'then' was on a separate line
    Tuesday, March 27, 2012 12:06 AM
  • Try this . GraphicsWindow version.

    init()

    GraphicsWindow.KeyDown=KeyInput
    Controls.ButtonClicked=Onclicked

    Sub keyInput      '  This works  when   you input a word  in the Box[2]
        Pw2=Controls.GetTextBoxText(Box[2])                   ' gets  words   from Box[2]
        Shapes.SetText(smsg[3]," ")                           ' delete smsg[3]
        If PW2<>PWD Then                                      '  if one word is added or not
          HidePW=Text.GetSubText(HidePW,1,Text.GetLength(PW2))' previous password
          HidePW=text.Append(HidePW,text.GetSubText(PW2,1,1)) ' connect password ( a word)
           mark()                                             ' go sub mark
           Controls.SetTextBoxText(Box[2],dots)               '  set ●
           PWD=HidePW                                         '  new PWD 
        EndIf
    endsub

    Sub mark
      L=text.GetLength(HidePW)
      dots=""
      For i=1 To L
        dots=dots+"●"                                          '  make dots 
      EndFor  
    EndSub


    Sub onclicked
     nm= Controls.GetButtonCaption(Controls.LastClickedButton) ' gets caption
     If HidePW<>"" Then                       
     username= Controls.GetTextBoxText(Box[1])          '  gets  username
     If nm="Memory & Lock" Then
         ViewPW=""
         Controls.SetTextBoxText(Box[2],ViewPW)         ' delete ●●●●....
         Controls.SetButtonCaption(btn,"Decipher")      ' change btn caption
         Shapes.SetText(smsg[2],"Input again!")         ' change message
         ExactPW=HidePW                                 ' EXact Hidden password
         HidePW=""
         PWD=""
      elseif nm="Decipher" then
       If ExactPW=HidePW then                            '  correct case
          ViewPW=""
         Controls.SetTextBoxText(Box[2],ViewPW)
         Controls.SetTextBoxText(Box[1],"")
         Shapes.SetText(smsg[3],"Hi "+ username + ", your access is granted!")
         Controls.SetButtonCaption(btn,"Memory & Lock")   ' initialize
         Shapes.SetText(smsg[2],"Input Password ")        ' initialize
         HidePW=""                                        ' initialize
         PWD=""                                           ' initialize
         ExactPW=""                                       ' initialize
        elseif ExactPW<>HidePW then                       '  incorrect case
         ViewPW=""
         Controls.SetTextBoxText(Box[2],ViewPW)        ' initialize
         Shapes.SetText(smsg[3],username+"   Sorry, wrong credentials.  Try agai!")
         HidePW=""                                     ' initialize
         PWD=""                                        ' initialize
       EndIf
      EndIf
     EndIf
    EndSub
     
    Sub init
      GraphicsWindow.BackgroundColor="Lightcyan"
      GraphicsWindow.FontSize=15
      For i=1 To 2
        smsg[i]=Shapes.AddText("  ")               '  in  this case ,  only  dumy 
        Shapes.Move(smsg[i],50,50*I) 
        Box[i]=Controls.AddTextBox(200,50*I)       '  add    TextBox1  &  TextBox2
        Controls.SetSize(Box[i],200,30)
      EndFor
      Shapes.SetText(smsg[1],"Input UserName ")    '  set  message
      Shapes.SetText(smsg[2],"Input Password ")
      GraphicsWindow.BrushColor="red"
      smsg[3]=Shapes.AddText(" ")
      Shapes.Move(smsg[3],150,50*5)
     
      PWD=""                                       '  initial PWD  to compare password
      Controls.SetTextBoxText(Box[2],PWD)          ' Box[2]=""
     
      btn=controls.AddButton("Memory & Lock",200,50*3)  ' Executing button
      Controls.SetSize(btn,200,30)
     
      GraphicsWindow.BrushColor="navy"               '  Input word color in the Box[1] and Box[2]
    EndSub

     

    Tuesday, March 27, 2012 2:26 AM
    Answerer
  • @NaochanON

    Like I said, I don't need GraphicsWindow.

    Please provide an example for TextWindow. Thanks.


    ------------------------------------------------------------------------------------------

    Tuesday, March 27, 2012 5:18 PM
  • Oh shoots! I've alwayz assumed programmers wanted things done on GraphicsWindows.
    Anywayz, I've done it for TextWindow as well!  \(^O^)/
    You just append the whole thing below at the end of your code; and then you can call my HiddenCLIInput() subroutine in place of native TextWindow.Read(), when you preffer not to display what's being typed.
    Optionally, you can specify HIPWMax as max input length accepted from user before invoking it.
    Result is stored in HIPWStr. Just transfer it to a safer variable of your choice; so you can call HiddenCLIInput() other times again if you need.
    You can find a sample usage in this link -> TGH751

    PS: It doesn't work well on Silverlight!

    '==============================================================='
    ' Hidden CLI Password Input '
    '==============================================================='
    
    Sub HiddenCLIInput
      '--- Accepts an input from the user w/o displaying what is being typed
      '--- Returns HIPWStr as the string typed
      '--- Accepts HIPWMax as maximum # of chars which HIPWStr can have
      
      SpecialCharsHeader()
      HiddenInputInit()
      HiddenInputLoop()
      
    EndSub
    '------------------------------------------------------------------------------------------------------------'
    Sub HiddenInputInit
      
      InitCursorX = TextWindow.CursorLeft
      InitCursorY = TextWindow.CursorTop
      
      If HIPWMax <= 0 Then    ' Max # of chars which can be accepted from user
        HIPWMax = 255         ' If HIPWMax is undetermined, use default 255
      EndIf
      
      HIPWKey     = ""    ' Typed char to be analysed
      HIPWStr     = ""    ' Password result formed outta accepted HIPWKey chars
      HiddenChars = ""    ' Which HIPWStrDisplay derives from
      HiddenChar  = STAR  ' Char displayed in place of what is being typed
      EnterKey    = CR    ' Key to confirm the input
      DeleteKey   = BS    ' Key to delete last char stored in HIPWStr
      
      For num = 1 To HIPWMax
        HiddenChars = HiddenChars + HiddenChar
      EndFor
      
    EndSub
    '------------------------------------------------------------------------------------------------------------'
    Sub HiddenInputLoop
      
      While HIPWKey <> EnterKey
        HIPWKey = TextWindow.ReadKey()   ' Waits next key to be hit
        HiddenInputParse()    ' Decides if it can be accept
        HiddenInputHide()     ' Replaces typed by HiddenChars
      EndWhile
      
    EndSub
    '------------------------------------------------------------------------------------------------------------'
    Sub HiddenInputParse
      
      HIPWKeyCode = Text.GetCharacterCode(HIPWKey)
      If HIPWKeyCode >= 32 Then                     ' Tests if printable
        HIPWStr   = Text.Append(HIPWStr  HIPWKey)   ' Creates PW string
      EndIf
      
      HIPWStrLen = Text.GetLength(HIPWStr) 
      If HIPWStrLen > HIPWMax Then          ' Checks if size passed limit
        HIPWKey  = DeleteKey
      EndIf
      
      If HIPWKey = DeleteKey Then   ' Deletes last char typed
        TextWindow.Write(SPC + BS + BS + SPC + BS + BEL)
        HIPWStr  = Text.GetSubText(HIPWStr  1  HIPWStrLen-1)
      EndIf
      
    EndSub
    '------------------------------------------------------------------------------------------------------------'
    Sub HiddenInputHide
      
      HIPWStrLen = Text.GetLength(HIPWStr)
      HIPWStrDisplay = Text.GetSubText(HiddenChars  1  HIPWStrLen)
      
      TextWindow.CursorLeft = InitCursorX   ' Repositions cursor at the beginning
      TextWindow.CursorTop  = InitCursorY
      TextWindow.Write(HIPWStrDisplay)      ' to display HiddenChars
      
    EndSub
    '------------------------------------------------------------------------------------------------------------'
    
    '==============================================================='
    ' Constant Header Includes '
    '==============================================================='
    
    Sub SpecialCharsHeader
      ' --- Initializes constants for special control characters in ASCII code:
      
      BEL= Text.GetCharacter   ( 7)   ' Makes internal PC-Speaker buzz
      BS=  Text.GetCharacter   ( 8)   ' Backspace
      TAB= Text.GetCharacter   ( 9)   ' Horizontal Tabulation (HT)
      LF=  Text.GetCharacter   (10)   ' Line-Feed (jumps a line)
      CR=  Text.GetCharacter   (13)   ' Carriage Return
      ESC= Text.GetCharacter   (27)   ' Escape Key
      CRS= Text.GetCharacter   (22)   ' Cursor
      ARW= Text.GetCharacter   (26)   ' Right Arrow
      QUO= Text.GetCharacter   (34)   ' Double Quotation Mark
      SQU= Text.GetCharacter  (166)   ' Half Vertical Rectangle
      APO=                     "'"    ' Apostrophe
      DOT=                     "."    ' Period
      COMMA=                   ","    ' Comma
      STAR=                    "*"    ' Asterisk
      SPC=                     " "    ' SPaCe
      
    EndSub
    '------------------------------------------------------------------------------------------------------------'
    • Edited by GoToLoopEditor Wednesday, March 28, 2012 3:07 AM Silverlight warning
    • Marked as answer by Joman Mied Monday, August 6, 2012 6:22 AM
    Wednesday, March 28, 2012 3:04 AM
    Answerer
  • Thank-you for the reply, I will now incorporate your code into mine, and hope I did it right as to see the passwords 'disappear.'

    ------------------------------------------------------------------------------------------

    Wednesday, March 28, 2012 4:20 AM
  • YAY! It works! Thanks GoToLoop! You saved my butt. I am still a beginner, as I used SmallBasic at least a year ago, but quit for a while. Now I am back into it, and learned many more things, like 'counter' and 'timer' and also Program.Delay(#), but I still needs lots of help.

    Thanks again for the help, and I know it is kinda strange for me to be using TextWindow, but I can't handle GraphicsWindow, let alone turtle right now. Maybe in the not-too-distant future, I will be creating GUIs for my programs :) Maybe once I reach your skill level, we could collaborate on a program?


    ------------------------------------------------------------------------------------------

    Wednesday, March 28, 2012 4:44 AM
  • Sure, I'll help w/ what I can.

    You know what, most of my own codes are still in TextWindow! I'm still getting used to GraphicsWindow, w/ its events, shapes and buttons.   ;-P

    For now, I think you've mentioned something about using GoTo 'cause you're not used to While?

    Small Basic comes w/ a beginner's programming manual in PDF. Also, there are some very nice downloadable curriculum slides at this link.

    To download them all, click here. They'll teach ya fast!

    Glad you liked my subroutine! :-)

    • Edited by GoToLoopEditor Wednesday, March 28, 2012 6:19 AM More Links
    Wednesday, March 28, 2012 5:56 AM
    Answerer