none
Textwindow.read() RRS feed

  • Question

  • read = TextWindow.Read()

    Lets say

    read = Small Basic

    I want to make it so

    a = "b"

    b = "c"

    .

    .

    .

    and then

    read = Tnbmm Cbtjd

    I am not sure on how to do this or if it is possible.


    • Edited by Dinomite07 Thursday, November 6, 2014 3:25 AM
    Thursday, November 6, 2014 2:32 AM

Answers

  •  How about this? 

    TextWindow.WriteLine("Input  words ")
    Read= TextWindow.Read()
    Len= Text.GetLength(Read)
    Plus=1
    For i=1 To Len
      CodeNMB=text.GetCharacterCode(Text.GetSubText(read,i,1)) ' gets each code number
      If CodeNMB=32 Then   '  space --> 32
        CodeNMB=CodeNMB-Plus
      EndIf
      NewRead= NewRead + text.GetCharacter(CodeNMB + Plus) '  gets  new character
    endFor
    TextWindow.WriteLine(NewRead)

    • Marked as answer by Dinomite07 Thursday, November 6, 2014 6:15 PM
    Thursday, November 6, 2014 7:15 AM
    Answerer

All replies

  •  How about this? 

    TextWindow.WriteLine("Input  words ")
    Read= TextWindow.Read()
    Len= Text.GetLength(Read)
    Plus=1
    For i=1 To Len
      CodeNMB=text.GetCharacterCode(Text.GetSubText(read,i,1)) ' gets each code number
      If CodeNMB=32 Then   '  space --> 32
        CodeNMB=CodeNMB-Plus
      EndIf
      NewRead= NewRead + text.GetCharacter(CodeNMB + Plus) '  gets  new character
    endFor
    TextWindow.WriteLine(NewRead)

    • Marked as answer by Dinomite07 Thursday, November 6, 2014 6:15 PM
    Thursday, November 6, 2014 7:15 AM
    Answerer
  • that would change what ever the user inputs to random letters, i want to change it to a set number of letters

    if the user enters Small Basic i want to so it changes to Tnbmm Cbtjd

    where each letter changes to the one next to it 

    a = "b"

    b = "c"

    .

    .

    .

    Thursday, November 6, 2014 5:52 PM
  • Did you test the program of NaochanON?

    It works as you ask!

    The only problem is with the character z wich trannslates as (.  To repair this you should look at the Math.Remainder function.


    Jan [ WhTurner ] The Netherlands


    Thursday, November 6, 2014 5:57 PM
    Answerer