Jump to content
Sign in to follow this  
stev379

Close application

Recommended Posts

I have an application that was designed in DOS and later updated/converted so it can run in XP. Usually it is closed by pressing the ESC key. I have an XP machine that won't close the app in this manner. I have to CTRL+ALT+DEL > tsk Mgr or hit the windows key and close group.

How can the ESC key be set as a hot key to close this application? As is the script stops running when I press the ESC key, but not the app that it started.

HotKeySet("{ESC}", "Terminate")

Run(@DesktopDir & "\Appfolder\App.exe")


While 1
    Sleep(100)
WEnd


Func Terminate()
    Exit 0
EndFunc

Share this post


Link to post
Share on other sites

Func Terminate()
    ProcessClose ("App.exe")
    Exit
EndFunc

Edited by Burrup

qq

Share this post


Link to post
Share on other sites

Thanks! Forgot about process close and kept looking for "exit", "quit" or "force quit" and the like in the help file.

Thanks again! :)

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...