How to get user input in BlitzPlus
BlitzPlus Forums/BlitzPlus Beginners Area/How to get user input in BlitzPlus
| ||
Just got BlitzPlus for my classroom and now the Blitz Basic input$ code in my programs opens in a separate window! My students code math games asking the user to input the correct answer. How can I refit the Basic code use of input$ to work in one window? |
| ||
Input/Print etc all operate within a console in BlitzPlus. I don't have it any more but I'm pretty sure you need to be using the GUI commands to get user input. Have a look at CreateTextField or possible CreateTextArea. |
| ||
If you must use a graphics window, check the code archives on this site, there are a couple of different solutions that should work for you. |
| ||
Yeah I just added one with a full example of it working. Today is your luck day :-) http://www.blitzbasic.com/codearcs/codearcs.php?code=1671 It's a bit complicated though. |
| ||
You could use the getkey() function, then convert the returned value to the cooriponding ASCII code using the chr() funciton. But this means you would have to change the numbers to strings so you could compare apples to apples. |
| ||
Thank you all that replied and for your diligent additions to the code achives. My students are totally hooked on learning to code using Blitz. I just have to try to stay one step ahead of them. Jogger |