I am looking to use excel as a macro program for an online game that I play. I would like to be able to export keystrokes from excel to the game. I am just having troubles learning how.
I am looking to use excel as a macro program for an online game that I play. I would like to be able to export keystrokes from excel to the game. I am just having troubles learning how.
Hi hustlerburns,
The following link is a tutorial for creating a simple game using Excel VBA. Chapter 6 addresses how the game identifies keystrokes.
See http://www.wiseowl.co.uk/blog/s398/f...-vba-index.htm
Lewis
Thanks for the game link. But I want to use excel to send keystrokes to a game, program, whatever. Not to use excel as a game.
If I have "Build" in a cell in excel and create a macro link to export keystrokes to a game that spell out "build" and then press enter.
To send text to another window is not trivial and may require a great deal of programming skill.
You may be able to do what you want with 'SendKeys'. SendKeys is not always reliable, and may not be possible with some versions of Windows unless you turn UAC (User Account Control) off which is not recommended.
See post #5 in the following thread for an example using Notepad: http://www.mrexcel.com/forum/excel-q...ing-focus.html
If SendKeys doesn't work there is a similar low level routine called keybd_event(). See the following for a Notepad example: http://www.vbcode.com/asp/showsn.asp?theID=3536
Sorry I couldn't be of more help.
Lewis
I thought this was going to be simple. But thanks for the links and the help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks