Morthawt Posted May 5, 2011 Share Posted May 5, 2011 (edited) Is it possible to have a script that can take keyboard input while I have another program on top focused? For example... A game that is in window mode but is focused and actively being used, then when you press certain keys the script sees it and performs functions based on the keys it detected that it has functions for. ? I have not messed with hotkeying and things yet, so I need to know any examples in as simple methodology as possible if you can show me a quick demo script on how that is done. Thanks guys, you really know your stuff here! Edited May 5, 2011 by Morthawt Free and easy Autoit scripting video tutorials (plus more videos always coming!) General video tutorials, especially correct and safe TeamSpeak permissions tutorials. Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 5, 2011 Share Posted May 5, 2011 You used the 'G' word... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Morthawt Posted May 5, 2011 Author Share Posted May 5, 2011 (edited) You used the 'G' word... I am not talking about automating games.. I am talking about having something open and focused but that the script can continue getting input and perform options. I sometimes play games so thats what came to my mind first, simple to press a button and have it load ventrilo and connect to a server for example, or open up a notepad.exe so you can type something really fast. I already have built in macro's made in the game, I dont need an external program to automate a game that has a macro feature built right in. Edited May 5, 2011 by Morthawt Free and easy Autoit scripting video tutorials (plus more videos always coming!) General video tutorials, especially correct and safe TeamSpeak permissions tutorials. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 5, 2011 Share Posted May 5, 2011 So open the helpfile and look at HotKeySet() then. What was the thread about again? .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 Link to comment Share on other sites More sharing options...
Morthawt Posted May 5, 2011 Author Share Posted May 5, 2011 So open the helpfile and look at HotKeySet() then. What was the thread about again? Basically I want to make a nice script that sits in the background waiting for a certain key combo or individual key so that I can use it to load up other programs without having to go to the lengths of using the start menu. So I could be looking at a website, watching a video, playing a game etc etc and I push "chosen button" and wham.. ventrilo loads or notepad loads or something else I use all the time.Will the hotkeyset function always work even in the background? Or do you have to have focus on a GUI in the script to work? Free and easy Autoit scripting video tutorials (plus more videos always coming!) General video tutorials, especially correct and safe TeamSpeak permissions tutorials. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 5, 2011 Share Posted May 5, 2011 Will the hotkeyset function always work even in the background?Yes, that's what a hotkey does. If you don't want to intercept the keypress, just see if it's pressed, see _IsPressed()Or do you have to have focus on a GUI in the script to work?That's GUISetAccelerators(). .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 Link to comment Share on other sites More sharing options...
Morthawt Posted May 6, 2011 Author Share Posted May 6, 2011 ah thanks. I will experiment. Free and easy Autoit scripting video tutorials (plus more videos always coming!) General video tutorials, especially correct and safe TeamSpeak permissions tutorials. Link to comment Share on other sites More sharing options...
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