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
Using inkey
#2
ardentcrest Wrote: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

Yes, use the IN (read port) which does not interrupt.
There is a library already for this.

Code:
#include <keys.bas> if MultiKeys(KEYENTER) then PRINT "Enter pressed" end if
Multikeys uses KEYxxxx constants (see this source at the end for available constants) and can check for several keys at once, using bOR or | (bitwise OR):
Code:
#include <keys.bas> if MultiKeys(KEYO | KEYZ) then PRINT "Key O, Key Z or both pressed" ' letter case does not matter! end if
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)