|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (6 bit)
Join Date: Dec 2005
Posts: 57
|
Is there a program that mimics keyboard input?
I've been wondering about this for awhile, it seems useless, but I still wonder.
Is there a program that mimics keyboard input? Not a virtual keyboard, or a program that just types randomly on its own, but something that tricks the computer into thinking a key on the physical keyboard has been pressed? You start the program and tell it what keys to mimic or something? Would it be hard to code if one doesn't exist? What got me thinking about this is a video on youtube of someone who hooked up 8 of those drinking ducks (the water drinking toy birds that bob back and forth) with some electronics. Every time the bird drank the water, it connected the circuit and made a sound. With all 8 hooked up, they all made different variations of the sound and it was sort of like a door chime. For some reason I started thinking about how it would work if it was setup to a computer keyboard, and came to the thought about the software. Here's the video, it's pretty cool idea http://www.youtube.com/watch?v=lgoV6Ixa8EI |
|
|
|
|
|
#2 |
|
Member (9 bit)
Join Date: Feb 2005
Posts: 392
|
yes, tons
you can probably find quit a few at: www.planet-source-code.com its not very difficult to code in C or C++, in my experience.
__________________
words to live by: others don't know, I know. others know, I know more. others know more, I excel. one shouldnt read this far; above, is meant as an encouragement, translated from a Chinese Proverb. "He who angers you conquers you." : Elizabeth Kenny |
|
|
|
|
|
#3 |
|
Member (6 bit)
Join Date: Dec 2005
Posts: 57
|
Thanks. It looks like I'm in over my head. I have no idea how to use any of the stuff on there. Do I need to open it in a c++ program to run it? Copy the code to command prompt?
|
|
|
|
|
|
#4 |
|
Member (9 bit)
Join Date: Feb 2005
Posts: 392
|
nope,
you need a C++ compiler. [ compile and run ] I think Borland gives out a free one. MicroSoft also have a free one, a while back. |
|
|
|
|
|
#5 |
|
Member (6 bit)
Join Date: Dec 2005
Posts: 57
|
Yeah, I was searching around scratching my head and found out I needed a compiler. I downloaded dev-C++. A lot of the code I try to use have errors, but I'm not even sure if I'm using the right code for what I want.
Thanks for setting me in the right direction though. |
|
|
|
|
|
#6 |
|
Member (9 bit)
Join Date: May 2007
Location: USA, New Jersey
Posts: 447
|
Check out AutoIT, it is free and runs great.
You can begin very simply by using the SEND command Example below is some very simple code for pressing TAB, then typing John, then pressing TAB, then typing Smith and then pressing ENTER send("{TAB}John{TAB}Smith{ENTER}") You can then compile the program above to a standalone *.exe file that anyone can run on a Windows computer. No installation required for that *.exe, they just click and run it. Download AutoIT here.. http://www.autoitscript.com/autoit3/ ---pete--- AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys). AutoIt is also very small, self-contained and will run on all versions of Windows out-of-the-box with no annoying "runtimes" required! AutoIt was initially designed for PC "roll out" situations to reliably automate and configure thousands of PCs. Over time it has become a powerful language that supports complex expressions, user functions, loops and everything else that veteran scripters would expect. Features: * Easy to learn BASIC-like syntax * Simulate keystrokes and mouse movements * Manipulate windows and processes * Interact with all standard windows controls * Scripts can be compiled into standalone executables * Create Graphical User Interfaces (GUIs) * COM support * Regular expressions * Directly call external DLL and Windows API functions * Scriptable RunAs functions * Detailed helpfile and large community-based support forums * Compatible with Windows 95/98/ME/NT4/2000/XP/2003/Vista * Unicode support * Digitally signed for peace of mind * Works with Windows Vista's User Account Control (UAC) Last edited by Petef56; 11-25-2007 at 07:29 AM. |
|
|
|
|
|
#7 |
|
Member (6 bit)
Join Date: Dec 2005
Posts: 57
|
Thanks Pete, Autoit is pretty fun to play around with.
I have one last question though, how do I loop text in notepad? |
|
|
|
|
|
#8 | |
|
Member (9 bit)
Join Date: May 2007
Location: USA, New Jersey
Posts: 447
|
Quote:
---pete--- |
|
|
|
|
|
|
#9 |
|
Member (6 bit)
Join Date: Dec 2005
Posts: 57
|
I found out how to have stuff be typed automatically in notepad, but I was wondering if I could repeat the last command for a couple seconds. For instance if I type out one sentence, how do I get that sentence to repeat itself forever? Hypothetically.
I don't understand the loop commands enough to figure out how to use them. Like the do...until command. I've been looking over tutorials but they are all over my head. |
|
|
|
|
|
#10 | |
|
Member (9 bit)
Join Date: May 2007
Location: USA, New Jersey
Posts: 447
|
Quote:
It's pretty simple so i think you will be able to follow the logic in the code. ---pete--- Code:
$i = 0
run ("c:\windows\notepad.exe")
;Wait until Notepad opens
WinWait("Untitled - Notepad","")
;Wait 3 seconds after Notepad opens
sleep(3000)
;Type HELLO 10 times and pause 1 sec between each HELLO
Do
$i = $i + 1
send("HELLO")
send("{ENTER}")
sleep(1000)
Until $i = 10
Last edited by Petef56; 11-28-2007 at 03:57 AM. |
|
|
|
|
|
|
#11 |
|
Member (6 bit)
Join Date: Dec 2005
Posts: 57
|
Thanks, that's what I was looking for. It's a lot easier to look over when it's all typed out for you
.Playing around with this code stuff sure gives me new appreciation for what coders do, and can only imagine some of the more complex stuff that they know how to code. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help me--java program | inflames988 | Web Design / Development | 1 | 05-19-2006 10:11 AM |
| C++ program fails to stop for input. | dataDude | Web Design / Development | 6 | 02-16-2006 06:57 PM |
| halt on "no errors" still stops on keyboard... | Colonel Sanders | Computer Hardware | 5 | 07-21-2003 10:45 PM |
| WinXP wont shutdown with USB keyboard | fidman | Windows Legacy Support (XP and earlier) | 5 | 09-20-2002 12:33 AM |
| New install: Keyboard trouble | Horty | Computer Hardware | 6 | 09-08-2002 09:41 AM |