Habe (Auto)Bernd´s Code genommen und nochmal soweit geändert, dass Alt F4, Alt Tab usw. nicht mehr funktioniert.
Minimiren funktioniertnichtmehr, da das Fenster direkt wieder aktiviert wird. Oben Rechts das Fenster Schließen gehtdurch löschen der GUI_EVENT_CLOSE nicht.
#include <GuiConstantsEx.au3>
#include <Misc.au3>
Opt("MustDeclareVars", 1)
[/autoit][autoit][/autoit][autoit][/autoit][autoit]Local $GUI, $coords[4], $input1, $label2, $bLoop, $text, $btnOK, $msg
$GUI = GUICreate("Zugriff Verweigert!!!", 630, 451, 407, 267)
GUISetBkColor(0xff5001, $GUI)
$label2 = GUICtrlCreateLabel("Wenn du nicht MiluBarakus bist solltest du hier schnell verschwinden.", 39, 50, 350, 40)
$input1 = GUICtrlCreateInput("", 39, 80, 350, 20)
$btnOK = GUICtrlCreateButton("an&melden", 39, 110, 70)
$bLoop = 0
GUISetState()
While $bLoop < 3
if WinExists("Windows Task-Manager") = true Then
WinClose("Windows Task-Manager")
EndIf
if _isPressed(10) = true or _isPressed(11) or _ispressed(12) Then
ToolTip("Don´t try to kill the Tool!")
EndIf
Winactivate("Zugriff Verweigert!!!")
[/autoit][autoit][/autoit][autoit]$coords = WinGetPos($GUI)
_MouseTrap($coords[0], $coords[1], $coords[0] + $coords[2], $coords[1] + $coords[3])
$msg = GUIGetMsg()
Switch $msg
case $GUI_EVENT_CLOSE
MSGBox(1, "Warning", "Don´t try to kill the Tool!")
case $btnOK
$bLoop += 1
$text = GUICtrlRead($input1)
If $text <> "test" Then
If $bLoop = 3 Then
MsgBox(4096, "Error", "You typed in the wrong thing for 3 Times =>EXIT!")
ExitLoop
Else
MsgBox(4096, "Error", "You typed in the wrong thing - try again!")
shellexecute("www.link.de")
EndIf
Else
MsgBox(4096, "AutoIt Example", "You typed in the correct word! Congrats.")
ExitLoop
EndIf
EndSwitch
_MouseTrap()
WEnd