Jump to content

ctrl break stopping my compiled script


Recommended Posts

By accident I discovered that ctrl-break not only stops a script being written and tested with tools/go, but even the compiled script is affected. I tried this on a variety of script and always got the same results.

ctrl-break is used so seldom by normal users that it is probably not a big deal, but it is a nuisance.

I would like to stop ctrl-break from acting on my compiled scripts.

I tried the following from the help file "GuiCreate" example and ctrl-break stops the compiled version:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Example1()

; example 1
Func Example1()
Local $msg

GUICreate("My GUI") ; will create a dialog box that when displayed is centered
GUISetState(@SW_SHOW) ; will display an empty dialog box

; Run the GUI until the dialog is closed
While 1
     $msg = GUIGetMsg()

     If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
GUIDelete()
EndFunc ;==>Example1

I tried

Break(0) ;Disable break

But that didn't seem to work.

Anyone have an idea on how to stop ctrl-break from stopping my compiled script?

Link to comment
Share on other sites

you can try to go around it with something similar to

If $msg = $GUI_EVENT_CLOSE And _IsPressed(11)+_IsPressed(13) <> 2 Then ExitLoop
Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
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...