Selecting inputs

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
simoncito
Newbie
Posts: 4
Joined: Sun Dec 12, 2010 7:51 pm

Selecting inputs

Post by simoncito »

I was wondering how I could select a input. Like have all inputs on the screen and go up and down through them to select the one I want. When I select the one, it will load a text file.
Thanks!
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Post by burger2227 »

How are you proposing to select them?

Mouse, Arrow keys, ESP or what?
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
simoncito
Newbie
Posts: 4
Joined: Sun Dec 12, 2010 7:51 pm

Post by simoncito »

With arrow keys.
Theunis
Coder
Posts: 21
Joined: Sun Oct 17, 2010 5:41 am

Post by Theunis »

I have quite a large FUNCTION ... END FUNCTION module where I select between 16 items on a MENU. Using a MOUSE, UP/Down Keys+Enter or typing the letters A-P (The 16 choices). Because you say INPUT and not Menu, I am not sure if this would help you. The Mouse was a routine I added to QB.QLB. moving the mouse or the cursor keys to an item highlights it.
There is just one catch it is written in my home language - Afrikaans - for a Trampoline Club. This module relies a few others. They would be the MENU module, a Frame Module and a portion of the Main Module where the choice is implemented.
If you can give me a more exact picture of your requirement I could possibly translate this module and the others for you. On it's own the FUNCTION consists of 95 lines. I would then also have to know how and where I can upload it to a site plus the revised QB.QLB, because it will be too long to post it here and how to do it is something I know nothing about.
Theunis
Coder
Posts: 21
Joined: Sun Oct 17, 2010 5:41 am

Arow keys to select menu

Post by Theunis »

Sorry I was blind again and did not read you last post. I see you only require the Arrow keys.
I can extract this from the module.
Please let me know how many items are involved and thereafter give me a day or two to see if I can help you.
simoncito
Newbie
Posts: 4
Joined: Sun Dec 12, 2010 7:51 pm

Post by simoncito »

I would be selecting from 11 files, and I really didn't know about anything so it could menu
simoncito
Newbie
Posts: 4
Joined: Sun Dec 12, 2010 7:51 pm

Post by simoncito »

From .txt files, so sort of a database
Theunis
Coder
Posts: 21
Joined: Sun Oct 17, 2010 5:41 am

Post by Theunis »

The file including the mouse is 14K. The mouse alone consist of five SUBs and the Frame, FrameBox etc has 4 modules. ie a total of Nine SUBs. I have named it SELECMEN.BAS

Without the Mouse the program will naturally be much smaller. It is now almost 9 pm in South Africa, and I should be able to give the modules without the mouse by about 10 am tomorrow.

@ Ted. Can I Upload this as code or what do you recommend ?
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Post by burger2227 »

No uploads here, but you can open a free DropBox account and post the link here.

When you install https://www.dropbox.com, it will place a Public Folder on your desktop. Just copy and paste files into it. Then right click the file after the status changes to a green checkmark and select Copy Link in the pop-up menu to paste it in your post. It's easy to use!

Use my email address as a recommendation when you join so that we both get extra storage allowances:

............. burger2227@gmail.com

Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
Theunis
Coder
Posts: 21
Joined: Sun Oct 17, 2010 5:41 am

Post by Theunis »

@Ted
I battled to find how to get the extra space, they ask for an e-mail address plus a password. I couldn't find anything else. Some more help would be appreciated.

@simoncito
The file ArowMenu.bas can be found here
http://dl.dropbox.com/u/16853400/AROWMENU.BAS

Please let us know if it is okay and/or feel free to ask questions about it.
It is in QB4.5
Last edited by Theunis on Wed Dec 15, 2010 5:15 am, edited 1 time in total.
Theunis
Coder
Posts: 21
Joined: Sun Oct 17, 2010 5:41 am

Post by Theunis »

@Ted
I found it under referral but they say you are already on Dropbox. So we have some bad luck.
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Post by burger2227 »

NATURALLY I am already on there. I can't give you my password LOL.

Don't worry about it.....

I DID give you my email address above
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
Post Reply