Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using Input$(1)
#1
Just wanted to clarify using Input$, in particular Input$(1). I was thinking Input$(1) would accept 1 input from the keyboard so in this case I have a Menu with 3 choices, my code reads 

_Keyclear
Abort$=Input$(1) 
ABrt = val(Abort$)

Select Case ABrt
etc

however no matter which number from the menu I chose the Abort$ was "" and ABrt = 0. I did use _Keyclear before the Input$(1) but came up with the same result. Eventually I found the correct entry for Input$(1) was 01, or 02, or 03. Using these two digits and the program flow moved on.

Interestly, IF I used Input$(2), which would not take a single digit, if I entered 01, or 02, or 03 the program flow would NOT move on unless I pressed ENTER.

The screens I'm using are graph screens (ie 1900,900,32) and the examples in the WIKI appear to be for a text screen or Pete's screen. Not sure if that may alter Input$(1) from accepting a single digit input from the keyboard or not.

Also, I am using Input$(2) in other subroutines of the same program where the inputs are mostly 2 digits and it works fine in terms of entering a two digit number and the program flow moves onto the next task without using ENTER. But there I don't use the _Keyclear before the inputs, could it be once you establish Input$ as (2) it must remain a (2)?
Reply


Messages In This Thread
Using Input$(1) - by Dimster - 09-21-2025, 03:36 PM
RE: Using Input$(1) - by SMcNeill - 09-21-2025, 03:53 PM
RE: Using Input$(1) - by Dimster - 09-21-2025, 04:29 PM
RE: Using Input$(1) - by Pete - 09-21-2025, 09:04 PM
RE: Using Input$(1) - by SMcNeill - 09-21-2025, 10:12 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question Converting input from other devices to standard PC gamepad analog input? madscijr 0 167 01-01-2026, 06:39 PM
Last Post: madscijr
  Input with _UPrintstring Dimster 6 789 07-16-2025, 02:38 PM
Last Post: Dimster
  reading multitouch touchscreen input madscijr 3 805 03-12-2025, 04:36 AM
Last Post: madscijr
  What options are there to get audio input? Dav 6 1,129 11-01-2024, 02:52 AM
Last Post: SpriggsySpriggs
Question reading multiple mice absolute position, keyboard with raw input api ? madscijr 1 724 05-29-2024, 05:38 PM
Last Post: madscijr

Forum Jump:


Users browsing this thread: 1 Guest(s)