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.

DarkBASIC Discussion / Fake keystrokes with DB

Author
Message
bob23
21
Years of Service
User Offline
Joined: 19th Oct 2003
Location: some where
Posted: 25th Feb 2004 02:39
I want to make a program (for my own use) that when the program is running it sends fake key strokes so my computer does not do in to stand by mode. How can I do this?

vist my web site www.freewebs.com/bobgames

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 25th Feb 2004 04:14
You have to call the Windows API functions to do that... I'm not too sure what the exact functoins are, but have a look at the User32 dll and see what you can find.

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Cyberflame
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: Im not sure....
Posted: 25th Feb 2004 04:27
Try a macro program...

quad 10k terrahert cpu| 9k^9k terrabyte(tb) hd|stolen military graphics card capable of rendering all of the pixar movies in 5 secs|999^9k tb of ram

15in monitor with 13in veiwable screen
bob23
21
Years of Service
User Offline
Joined: 19th Oct 2003
Location: some where
Posted: 25th Feb 2004 18:54
User32 dll ok I'll look for that Thanks

vist my web site www.freewebs.com/bobgames

Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 25th Feb 2004 23:21 Edited at: 25th Feb 2004 23:28
why not just go into settings and disable standby, I have never had any screensaver and no power down of anything, I can leave the machine all day and it won`t shut down, just right click the desktop, select the screen saver tab, disable the screen saver, then go into power settings (button in section marked monitor power with energy star logo) and set everything to "never", now the machine will never shut down or send drives to sleep or blank the screen, blanking the screen is a pointless exercise (unless you want to be eco-friendly and save energy) since modern monitors don`t "burn" like the old ones did...mine have never had any visible damage from running without screensavers (in 15 years) and in the case of TFT (LCD) displays, they won`t be affected at all since they don`t work in a way that would cause that effect, cheers.

Mentor.

1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, ATI radeon 9800 pro gfx, 6 way surround sound, 2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster, ups.
Scilynt
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: .-#-.
Posted: 26th Feb 2004 02:41
You are looking for http://www.mentalis.org/apilist/keyb_event.shtml.You load up User32.dll as usual, and then use:



where keycode is the value of the key you want to send.

Cya
Silent

Login to post a reply

Server time is: 2025-05-22 17:24:29
Your offset time is: 2025-05-22 17:24:29