How can I program my computer to type data from notepad?

Basically, I need to type data from a notepad file to a program that only input data that you type from a key broad. The hardiest thing is that the data is created by excel so it look something like this:
A B C D E F
G H I J K L
But I need it to type like this:
A¶B¶C¶D¶E¶F¶G¶H¶I¶J¶K¶L¶
So my question is: is it possible to program my computer to do so or it is just impossible?

PKM3 years ago

The simplest solution is probably the SendKeys function. You can write simple windows scripts that type out text: here is an example.

' Open notepad

Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.Run "notepad", 9


' Give Notepad time to load

WScript.Sleep 500


'type in Hello World

WshShell.SendKeys "Hello World!"

WshShell.SendKeys "{ENTER}"

Save that into a .vbs file and run it. That will open notepad and type "Hello World" into it. If you can figure out how to run your program from the command line, just replace "notepad" in the script with the name of your program. Otherwise, you could take out that line and replace the "Sleep 500" with "Sleep 5000"- that will give you five seconds after you start running the script to click on your program's window so that's where the input goes.

Making this script load text from a text file and type it out is harder and you might want to switch to a more advanced scripting language like Perl/Python for that.