ddear Posted April 29, 2010 Share Posted April 29, 2010 New here, this program was recommended by a friend. I am not really a programmer, I do some simple scripting to get things done. I am trying to figure out if AutoIt can do what I am looking for. I want to trap when the f9 key is pressed. The active application will be another program.I need to pause what the active application does.(I know the process and program exe). Once f9 is pressed, I want to do a couple things, and return to the active application. Is this possible? If possible just point me in the right direction, if I am out to lunch - let me know - cheers Link to comment Share on other sites More sharing options...
Tvern Posted April 29, 2010 Share Posted April 29, 2010 Capturing F9 is easy. As long as you start your script before any other application registers it as a hotkey this should run a function when F9 is pressed. It also prevents F9 from being send to any other application. HotKeySet("{F9}","_YourFunctionName") ;register F9 hotkey and bind it to your function While 1 Sleep(100) ;wait indefinately untill the hotkey is pressed WEnd Func _YourFunctionName() ConsoleWrite("F9 was pressed" & @CRLF) ;the function to execture once the hotkey is pressed EndFunc I can't help you with the contents of the function as I'm not clear on what you want it to do exactly. Is there a build in wait to pause the application? If so, how do you normally active it etc. Link to comment Share on other sites More sharing options...
ddear Posted April 29, 2010 Author Share Posted April 29, 2010 I will try and figure out the rest... very interesting and thanks for the fast response! -d 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