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 / How to create a program which makes the computer think a key is being pressed when it isn't?

Author
Message
Xlaydos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 4th Apr 2005 07:42
How do i make a program which makes the computer think a key is being pressed when it isn't?

Is this possible in DB / DBP or will i need another program
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 4th Apr 2005 09:22
You could assign a boolean variable to the key, eg.

if spacekey()=1 then keypress=1 else keypress=0

Then saying 'keypress=1' would give the same result as if the spacekey was pressed.

robo cat
20
Years of Service
User Offline
Joined: 23rd Feb 2004
Location: In a cat litter tray, near you...
Posted: 4th Apr 2005 17:22
I think Xlaydos means for making other programs, not just his Dark Basic program think the spacekey is being pressed. For example programs like As-U-Type (think thats how its spelt) where it intercepts the keyboard data, modifies it and sends new key presses to other programs to correct spelling or to use macros. I don't think its possible in DBPro as you need to do some low level commands which you don't have access to. I might be wrong though.

Simple... yet fun!
BearCDPOLD
20
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 4th Apr 2005 18:54
If you're just wanting characters, you can write the characters into arrays and such, if you're actually wanting to send a signal to the computer saying "user has pressed button X, button Y, button Z" in order to do things like system commands (Ctrl-Alt-Delete maybe?) you're going to want to try C++ with some low-level commands, or something else with similar functionality.

Crazy Donut Productions
Current Project: A Redneck game
Xlaydos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 4th Apr 2005 20:23
I need it so it can load up a file or website or something and select a certain area with the mouse, click there, then type something in :S

Login to post a reply

Server time is: 2024-09-23 17:22:01
Your offset time is: 2024-09-23 17:22:01