Jump to content

How to exit with one key?


Go to solution Solved by Musashi,

Recommended Posts

  • Moderators
Posted

belial,

The function to look for in the Help file is "HotKeySet".

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

  • Solution
Posted

Example :

HotKeySet("{ESC}", "_Terminate")
ToolTip(@ScriptName & " is running. " & @CRLF & "Press ESC to exit !", 400, 500, "Info :", 1, 1)
; -------------- Main-Loop -----------------
While 1
    Sleep(250)
WEnd
; -------------------------------------------
Func _Terminate()
    Exit;
EndFunc   ;==>_Terminate

 

  On 8/19/2021 at 4:55 PM, belial said:

... hotkey (NumpadEnter::ExitApp) ...

Expand  

Note : The following hotkey cannot be set : NumPad's Enter Key --> Instead, use {Enter} which captures both Enter keys on the keyboard.

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

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
  • Recently Browsing   0 members

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