02-21-2015, 10:58 PM
ardentcrest Wrote:I believe that just flashes the cursor when a key is pressed.



Code:
10 dim z$ : let z$="this is a test of an inkey$ editor " : gosub 2000 :stop
2000 rem INPUT+
2002 let length=len z$
2004 let row=32
2006 let x$="*"
2008 print at 10,0; bright 1;z$( to row );x$;z$( row+1 to )
2010 let k=code inkey$ : if k then beep .2,0 : end if
2011 if k>31 and k<128 then goto 2264 : end if
2012 if k=13 then goto 2036 :end if
2013 if k=8 then goto 2026 :end if
2014 if k=9 then goto 2028 :end if
2015 if k=10 then goto 2030 :end if
2016 if k=11 then goto 2032 :end if
2017 if k=12 then goto 2034 :end if
2018 if k=7 then goto 2024 :end if
2019 goto 2010
2026 if not row then goto 2010 : end if
2027 let row=row-1 : goto 2008
2028 if row=length then goto 2010 :end if
2029 let row=row+1 : goto 2008
2030 if row+32>length then goto 2010 :end if
2031 let row=row+32 : goto 2008
2032 if row<32 then goto 2010 : end if
2033 let row=row-32 : goto 2008
2034 if not row then goto 2010 : end if
2035 let row=row-1 : goto 2041
2036 print at 10,0;z$;">" : return
2038 goto 2010
2040 if row=length then goto 2010 : end if
2041 let z$( row+1 to )=z$( row+2 to ) : let z$(length)="" : goto 2008
2264 if row=150 then goto 2010 : end if
2265 let row=row+1 : if row<length then let z$( row+1 to )=z$( row to ) : end if
2266 let z$(row)=chr$(k) : goto 2008
2499 goto 2010
Silly me had a let row=0 in line 2018, just had to remove it :oops:
Just need now to work out how to get it to print in 42 or 64. And on the bottom two lines.
Still a bit buggy need to work on how ROW works.
I'm always on the chat or facebook.