GentleManSteve Posted August 29, 2008 Posted August 29, 2008 Key presses without loading program I was wondering how I can make an exe that will input key presses to a program or game without having the exe macro script to load it. I have a game that I am playing and need to make something that will keep pressing the ENTER key over and over repeatedly until I stop it. Thanks for any help. Can I do that without loading the program or game with the script exe? I want to have the game playing then click to start the exe script to continue pressing the ENTER key until I stop it. Thanks again
AdmiralAlkex Posted August 29, 2008 Posted August 29, 2008 (edited) Welcome to the forums!!Your question doesn't make much sence to me, I can't see how starting the game with the script would matter at all. To send enter infinitely you could use something like:HotKeySet("^{BREAK}", "_Quit");So you can exit by pressing CTRL+BREAK While 1;"While 1" means an infinite loop ControlSend("Insert window name here", "", 0, "{ENTER}");For sending 1 enter Sleep(10);This is for not taking all CPU WEnd;Everything between While and WEnd will loop Func _Quit() Exit;Exit script EndFunc Edited August 29, 2008 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
GentleManSteve Posted August 29, 2008 Author Posted August 29, 2008 I am not good at all the scripting it would take to open the game and get where I need to be in the game then start with the enter key. That is why I want it to be able to press the enter without the script loading the game. Whe the game starts I have to get it in place before the pressing of the enter key take place. It is a full screen game That code didn't work. I mean when I got the game to the point where the enter key should be pressed and I started the script it didn't act like the enter key was being pressed in the game. I had to manually press it. Thanks for any help. I have saved that code.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now