Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / input help

Author
Message
yosepp
21
Years of Service
User Offline
Joined: 14th Dec 2002
Location:
Posted: 4th Jan 2003 18:26
how do i verify if a variable like mg$ is equal to Y. the variable was specified by
i tried
but that wouldn,t work
fire, fire, fire
-"Cornholio" alias Beavis
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 4th Jan 2003 19:09
To check for a string you need to enclose the string in "'s.



Whatever I did I didn't do it!
jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 4th Jan 2003 19:30
Another thing to do is:



So that it doesnt matter if it was typed in caps or not.

Jas
yosepp
21
Years of Service
User Offline
Joined: 14th Dec 2002
Location:
Posted: 4th Jan 2003 19:55
thx, but how to check for F-keys or Capslock. Also, how to check it during game so the game won't pause every time and without the input thatsall the time there. iknow, that i have a lot of questions but i,m new. i bet you where new also.[img][/img]

fire, fire, fire
-"Cornholio" alias Beavis
jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 4th Jan 2003 20:13
Have a look at the ENTRY$ Function (As well as all the other INPUT fuctions)in the online help and look at my input routined I've posted into the Code Snippets area for an idea on how it can be used.

Another small example of keyboard reading is below:

haggisman
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 4th Jan 2003 20:16
To get things like F-keys and Capslock you can use the keystate() command.

This image lists all the numbers that go into keystate, note your keyboard may have a slightly different set of numbers.



if you wanted input from the F1 key you would use:

if keystate(59)=1 then print "You hit the F1 key"

Specs:- 1GHZ athlon, Radeon8500, 192mb ram, winxp
yosepp
21
Years of Service
User Offline
Joined: 14th Dec 2002
Location:
Posted: 5th Jan 2003 15:27
thx, it worked [img][/img]

fire, fire, fire
-"Cornholio" alias Beavis

Login to post a reply

Server time is: 2024-11-23 20:41:28
Your offset time is: 2024-11-23 20:41:28