The double click is there to prevent closing the window/app by misclicks.
If you do not like it, the source code is in the archive.
Change the following code
Case $GUI_EVENT_CLOSE
If $closecounter = 1 Then
If TimerDiff($TimeHandle) <= 1000 Then
ExitLoop
EndIf
EndIf
If $closecounter = 0 Then
$closecounter = 1
$TimeHandle = TimerInit()
WinSetTitle($h_SnipForm, "", "Doubleclick to close")
EndIf
Into
Case $GUI_EVENT_CLOSE
ExitLoop
And the main window will close on single click.
Then seek the
Case $GUI_EVENT_CLOSE, $BTN_EXIT
If $closecounter = 1 Then
If TimerDiff($TimeHandle) <= 1000 Then
$snipeditclose = 0
If $snipeditchanged = True Then
$iMsgBoxAnswer = MsgBox(8244, "Exit without saving ?", "Do you want to close the editor without saving the changes ?")
If $iMsgBoxAnswer = 7 Then $snipeditclose = 1 ;No
EndIf
If $snipeditclose = 0 Then
GUIDelete($Form1)
ExitLoop
EndIf
WriteToolBar("Please save your file.")
EndIf
EndIf
If $closecounter = 0 Then
$closecounter = 1
$TimeHandle = TimerInit()
WinSetTitle($Form1, "", "Doubleclick to close")
EndIf
code and change it into:
Case $GUI_EVENT_CLOSE, $BTN_EXIT
$snipeditclose = 0
If $snipeditchanged = True Then
$iMsgBoxAnswer = MsgBox(8244, "Exit without saving ?", "Do you want to close the editor without saving the changes ?")
If $iMsgBoxAnswer = 7 Then $snipeditclose = 1 ;No
EndIf
If $snipeditclose = 0 Then
GUIDelete($Form1)
ExitLoop
EndIf
WriteToolBar("Please save your file.")
And the editor will close on single click.