Shop OBEX P1 Docs P2 Docs Learn Events
Would like to paste and enter a string into PST input window — Parallax Forums

Would like to paste and enter a string into PST input window

Don MDon M Posts: 1,652
edited 2014-04-06 18:57 in Propeller 1
Currently I enter 12 characters one at a time as I type them in into memory using this code:
  repeat while bytesread < 12
    tmp := term.Rx
    if ((tmp == 10) OR (tmp ==13) OR (tmp == "*"))
      QUIT
    if ((tmp => ("0")) and (tmp =< ("9"))) OR ((tmp => ("A")) and (tmp =< ("F")))
      byte[@MachID][bytesread] := tmp
      i2c.WriteByte(i2c#BOOTPIN, EE_DEVICE_ADDR, (EE_BASE_ADDR + bytesread), tmp)
      term.tx(tmp)                                    ' For debugging message 
      bytesread++



It works well for 1 character at a time but I would also like to be able to paste a string of 12 characters into the PST input window and press the Return key to have them entered in.

How do I modify my code in order to do this?

Any help or suggestions appreciated.

Thanks.
Don

Comments

  • kuronekokuroneko Posts: 3,623
    edited 2014-04-06 18:11
    No code changes required, problem is that PST seems to ignore paste'd content, i.e. while it's displayed in the input window it's not sent down the line.
  • Don MDon M Posts: 1,652
    edited 2014-04-06 18:44
    Ok so I tried using Putty instead. I can do it with Putty.

    Thanks for your comment.
  • Don MDon M Posts: 1,652
    edited 2014-04-06 18:57
    I had to add a 50msec pause after the write to eeprom command otherwise it would not store it. But works cool now with Putty.
Sign In or Register to comment.