Jump to content

[Help] Simple Program to Close Current Window


Recommended Posts

This is my first application so, be gentle.

I just cannot figure out how for the life of me, how to tie the 'Hotkey' to a func or whatever it needs to be in order to Close the Current Window/Process. I want it to Kill the process by pressing a button on the keyboard and also stay open so that I could use the hotkey to close other applications(loop). Rewrite the code if you have to.. give me pointers. I'm just trying to learn. Is there a book I can buy to learn this stuff? I'm a technology hobbyist and I'm dipping my foot into this territory and heard this is a good way to learn. Thank you.

HotKeySet("{f5}", "close")

Global $ON = False


;close func
Func close()
$ON = True
EndFunc

if $ON = True then
WinClose( "{ACTIVE}" )
endif
Edited by Aeowon
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...