Modify ↓
Opened 16 years ago
Closed 16 years ago
#823 closed Bug (Wont Fix)
OnAutoItExit does not trigger on Control-C in console mode.
Reported by: | david@… | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.3.0.0 | Severity: | None |
Keywords: | Cc: |
Description
If I compile my script to run in console mode and hit control-C as it is running it will terminate the program but not run OnAutoItExit.
I "worked around" the issue by using HotKeySet( "c", "ControlC" ) and have that function call an Exit command which triggers OnAutoItExit. This is undesirable as it traps Control-C everywhere even when I am trying to copy and paste in another program.
Attachments (0)
Change History (1)
comment:1 Changed 16 years ago by Valik
- Resolution set to Wont Fix
- Status changed from new to closed
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Note: See
TracTickets for help on using
tickets.
I'm closing this as Won't Fix. There are (at least) two ways you can handle this. You can use DllCall() and the Windows API SetConsoleMode() function to change how Ctrl+C is interpreted. You can also use DllCall(), DllCallbackRegister() and the Windows API SetConsoleCtrlHandler() to receive notification of the event and handle it appropriately.