Guest kewlsunman Posted August 28, 2004 Posted August 28, 2004 (edited) Hi all, I'd like to see an example of a script that could perform an "Alt+F4" on the active window. Basically, all I want is something I can run, it will find the previous active window, and close it. For instance, I hotkey this program to my keyboard. While I'm surfing the net, I press the hotkey and Internet Explorer closes. Or I'm typing on AIM, I press the hotkey and AIM closes. And then, this script will exit out of itself. Any and all help appreciated =) -ksm Edited August 28, 2004 by kewlsunman
Guest kewlsunman Posted August 28, 2004 Posted August 28, 2004 (edited) Wow, that was quick, I appreciate it =) However... I guess that wasn't what I was looking for.... Let me explain further, I have a Multimedia Keyboard and I want one of those buttons to be able to perform a "Close Active Program" action. The buttons can only be programmed to either access a webpage or access an .exe. Thus, the only thing I can think of is to write a program that somehow determines what the active window at that moment is (not including itself) and closes it. I went and wrote a program like this in VB and everything seemed great, until I actually linked the special button to the program. Then I realized that the program was actually closing the keyboard software that was linking the program to the keys. What I'm thinking is just a quick program that can send keystrokes: specifically ALT+F4, and then it will immediately close itself. Thanks again! -ksm Edited August 28, 2004 by kewlsunman
ezzetabi Posted September 1, 2004 Posted September 1, 2004 However... I guess that wasn't what I was looking for.... Let me explain further, I have a Multimedia Keyboard and I want one of those buttons to be able to perform a "Close Active Program" action. The buttons can only be programmed to either access a webpage or access an .exe. Thus, the only thing I can think of is to write a program that somehow determines what the active window at that moment is (not including itself) and closes it. <{POST_SNAPBACK}>And the Larry program do not works? It is strange. Make a program like msgbox(0,'TEST',WinGetTitle("") ) compile it and test it with you keyboard. So you'll know that is the active window when you press the button.
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