The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Looking for an Inkey$ routine.
#1
I'm thinking of re-doing my spectranet client but I need a good inkey$ input routine. the one I have ether misses keys presses or does multi letters.

I am using

#include <input.bas>
#include <keys.bas>

Code:
MAIN: NETmainloop() gosub NETinputloop NETmainloop() goto MAIN NETinputloop: for timeout=0 to 1500 : next timeout if rowx=0 then printat64(22,0):print64(xx$+" "):goto NetJump1 : end if FOR ii = 0 TO rowx : printat64(22,ii):print64(chr$(peek (@MyLabel + ii))) : NEXT ii : print64(xx$+" ") NetJump1: let k=code inkey$ : for timeout=0 to 1500 : next timeout if k>31 and k<128 then goto NetKeyPress : end if if k=13 then goto senddata : end if if k=12 then goto NetDeleteKey : end if return NetDeleteKey: if rowx=0 then goto NETinputloop : end if POKE (@MyLabel + (rowx-1)), 0 let rowx = rowx - 1 return NetKeyPress: if rowx=length then goto NETinputloop : end if POKE (@MyLabel + rowx), k let rowx = rowx + 1 return senddata: printat64(22,0):print64(" ") POKE (@MyLabel + rowx), 13 POKE (@MyLabel + rowx+1), 10 poke (@MyLabel2),(rowx+2) poke (@MyLabel2+1),0 send2() NETline() for ii=0 to rowx+1 : POKE (@MyLabel + ii), 0 : next ii let rowx=0 return END


any hekp
I'm always on the chat or facebook.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)