is there a way to translate inputed keys to their asci numeric value?
Code:
DO
CLS
press$ = INKEY$
LOCATE 1,1 : PRINT press$
SLEEP
LOOP
just do like
Pr equals the ascii value of Press$
(It's like the opposite of CHR$())
*illiegal function call*
ok i think it's saying that becausethe fis second it runs there is no data. feed it dummy data until press$=inkey$ ? it is an issue wiht there being no data. so how do ya make it work??
AFAIK, it's better to do this when reading from port 60h:
Code:
FUNCTION neoKeybInkeyScan%
k% = INP(&H60)
IF k% > 128 THEN neoKeybInkeyScan% = 0 ELSE neoKeybInkeyScan% = k%
END FUNCTION
Because port 60h tends to return non-zero values even when no keys is being pressed. If that's so, check for the limit of 128, and if so, there's no key being pressed.
But... this function returns Scan Codes, not ASCII codes (na_th_an....
)
lol
you're right
hahaha
Personal note: Don't ever post at 8:00 am
Quote:lol
you're right
hahaha
Personal note: Don't ever post at 8:00 am
Wow, you're up that early!
About the personal note...
What I do with INKEY$, if I use it, is I split it up into three parts, like so:
Code:
DO
i$ = INKEY$
IF i$ <> "" THEN
IF LEN(i$) = 2 THEN
SELECT CASE ASC(MID$(i$, 2, 1))
CASE 77: EXIT DO 'That's the right arrow key
END SELECT
ELSE
SELECT CASE ASC(i$)
CASE 27: EXIT DO 'That's <esc>
END SELECT
END IF
END IF
'do stuff that you would do regardless of any keys pressed...
LOOP
dood u got the nuttiest lookin code i ever seen
its all good tho
:o :o :o Apparently you haven't seen a lot of code.. . . . ...