RokuKevin
16 years agoVisitor
Inputting special characters like newline into strings
When you want to display strings with newlines (or any other special char), you need to use the chr() funtion. This function takes an integer as input and outputs the ascii character corresponding to that integer. Since the ascii value of '\n' is 10, you can display separate lines on a paragraph screen like so:
txt = "List of Special Instructions"+chr(10)
txt = txt + "1. Goto our great site..."+chr(10)
txt = txt + "2. Create an account..."+chr(10)
txt = txt + "3. Link your Roku..."+chr(10)
dialog.SetText(txt)
txt = "List of Special Instructions"+chr(10)
txt = txt + "1. Goto our great site..."+chr(10)
txt = txt + "2. Create an account..."+chr(10)
txt = txt + "3. Link your Roku..."+chr(10)
dialog.SetText(txt)