Posts: 105
Threads: 11
Joined: Oct 2013
Reputation:
0
Any one know how to do something like this
I'm looking to use inkey$ to create a line of text while the program is doing some other things Ie
LOOP
DO THING 1
INKEY(text string)
DO THING 2
IF ENTER PRINT(text String)
GOTO LOOP
any help on this
I'm always on the chat or facebook.
Posts: 105
Threads: 11
Joined: Oct 2013
Reputation:
0
This could be of help. for other parts of my program
But I dont think its what I'm looking for.
I want to type in a line of text while other things are happening.
I'm always on the chat or facebook.
Posts: 105
Threads: 11
Joined: Oct 2013
Reputation:
0
ty
I'm always on the chat or facebook.
Posts: 105
Threads: 11
Joined: Oct 2013
Reputation:
0
PS
Hope everything is working out all right for you Boriel.
I'm always on the chat or facebook.
Posts: 105
Threads: 11
Joined: Oct 2013
Reputation:
0
HUMMMMM. Posts when missing
Need help. This compiles with no errors but still will not work. Any help.
Code:
10 dim z$ : let z$="this is a test of an inkey$ editor " : gosub 2000 :stop
2000 rem INPUT+
2002 poke 23658,0 : let length=len z$
2004 for row=length to 1 step -1
2005if z$(row)=" " then CONTINUE FOR: end if : next xx
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 .02,0 : end if
2011 if k>31 and k<128 then goto 2264 : end if
2012 if k=13 then end :end if
2018 let row=0 : goto 2008
2020 goto 2004
2022 poke 23658,8 and not peek 23658 : goto 2006
2024 let z$="" : let row=0 : goto 2008
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 print k:let z$(row)=chr$(k) : goto 2008
2499 goto 2010
I'm always on the chat or facebook.
Posts: 105
Threads: 11
Joined: Oct 2013
Reputation:
0
So much fun on this one. No matter what I do it almost works, but not quite works.
I'm always on the chat or facebook.
Posts: 105
Threads: 11
Joined: Oct 2013
Reputation:
0
I believe that just flashes the cursor when a key is pressed.
I'm always on the chat or facebook.
Posts: 105
Threads: 11
Joined: Oct 2013
Reputation:
0
ardentcrest Wrote:I believe that just flashes the cursor when a key is pressed.
Got it working......
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.
Posts: 105
Threads: 11
Joined: Oct 2013
Reputation:
0
Sorry Sorry sorry......
Code:
INK 7 : PAPER 0 : BORDER 0 : CLS
#include <keys.bas>
let length=60 : let rowx=0 : let xx$="<"
NETinputloop:
if rowx=0 then print at 22,0;xx$ : goto NetJump1 : end if
print at 22,0; : FOR ii = 0 TO rowx : print chr$(peek (@MyLabel + ii)); : NEXT ii : print xx$;" "
NetJump1:
let k=code inkey$ : if k then beep .2,0 : end if
if k>31 and k<128 then goto NetKeyPress : end if
if k=13 then end : end if
if k=12 then goto NetDeleteKey : end if
goto NetJump1
NetDeleteKey:
if rowx=0 then goto NETinputloop : end if
POKE (@MyLabel + rowx), 0
let rowx=rowx-1
goto NETinputloop
NetKeyPress:
if rowx=length then goto NETinputloop : end if
POKE (@MyLabel + rowx), k
let rowx=rowx+1
goto NETinputloop
MyLabel:
ASM
text1:
ds 1024 ; 1024 bytes of space MAX!!
END ASM
MyLabel2:
ASM
lenth1:
ds 1 ; 1024 bytes of space MAX!!
END ASM
When NetDeleteKey: it should move the cursor back but does not. What am I missing.
I'm always on the chat or facebook.
Posts: 105
Threads: 11
Joined: Oct 2013
Reputation:
0
OK.............
GOT IT
POKE (@MyLabel + rowx), 0 should be POKE (@MyLabel + (rowx-1)), 0
2 hours looking at that one.....
I'm always on the chat or facebook.