Einfach klasse !!!
Letzte Frage:
Ich möchte das MiniGUI erst verschwindet, wenn die Tastatur und Maus entsperrt sind. Geht das ?
Spoiler anzeigen
_MiniGUI("Hinweis", "Bitte warten Sie bis die Programme installiert sind. Die Tastatur und Maus sind solange gesperrt!", 1000, 0x006000, 0xFFFFFF)
Blockinput(1);Sperren Tastatur und Maus
;~ Angang der Installation
MsgBox(0, "CAD-Installation", "Installation PlotFlow", 3)
ShellExecuteWait("C:\install\PlotFlow.exe")
MsgBox(0, "CAD-Installation", "Installation Sikla", 3)
ShellExecuteWait("C:\install\Sikla.exe")
;~ Ende der Installation
Blockinput(0);Entsperren Tastatur und Maus
MsgBox(0,"Status der CAD-Installation","Folgende Programme wurden erfolgreich installiert:"&@CRLF&"-------------------------------------------------------------"&@CRLF&"PlotFlow"&@CRLF&"Sikla")
Func _MiniGUI($Titel, $Text, $Wait, $Color1, $Color2)
$MINI_GUI_Transwert = 255
$MINI_GUI_dif = 0
;~ $MINI_GUI = GUICreate("MINI_GUI", 250, 200, @DesktopWidth - 270, @DesktopHeight, 0x80000000, 0x00000080)
$MINI_GUI = GUICreate("MINI_GUI", 250, 200, @DesktopWidth/2 - 0, @DesktopHeight/2, 0x80000000, 0x00000080); Hier anpassen
GUISetState(@SW_SHOW, $MINI_GUI)
GUISetBkColor($Color1, $MINI_GUI)
$MINI_GUI_Titel = GUICtrlCreateLabel($Titel, 50, 20, 150)
GUICtrlSetFont($MINI_GUI_Titel, 16)
GUICtrlSetColor($MINI_GUI_Titel, $Color2)
$MINI_GUI_Text = GUICtrlCreateLabel($Text, 50, 65)
GUICtrlSetColor($MINI_GUI_Text, $Color2)
$MINI_GUI_Line1 = GUICtrlCreateLabel ("", 0, 0, 250, 1)
GUICtrlSetColor($MINI_GUI_Line1, $Color2)
GUICtrlSetBkColor($MINI_GUI_Line1, $Color2)
$MINI_GUI_Line2 = GUICtrlCreateLabel ("", 0, 0, 1, 200)
GUICtrlSetColor($MINI_GUI_Line2, $Color2)
GUICtrlSetBkColor($MINI_GUI_Line2, $Color2)
$MINI_GUI_Line3 = GUICtrlCreateLabel ("", 249, 0, 1, 200)
GUICtrlSetColor($MINI_GUI_Line3, $Color2)
GUICtrlSetBkColor($MINI_GUI_Line3, $Color2)
$MINI_GUI_LineMiddle = GUICtrlCreateLabel ("", 25, 50, 200, 3)
GUICtrlSetColor($MINI_GUI_LineMiddle, $Color2)
GUICtrlSetBkColor($MINI_GUI_LineMiddle, $Color2)
;~ WinMove ( "MINI_GUI", "", @DesktopWidth - 270, @DesktopHeight - 200, 250, 200, 5)
WinMove ( "MINI_GUI", "", @DesktopWidth/2 - 0, @DesktopHeight/2 - 200, 250, 200, 5) ; Hier anpassen, (nochmal das selbe rein)
$MINI_GUI_begin = TimerInit()
Do
$MINI_GUI_dif = TimerDiff($MINI_GUI_begin)
$aMousePos1 = MouseGetPos()
$aWinPos1 = WinGetPos(WinGetTitle($MINI_GUI))
If $MINI_GUI_dif > $Wait/5 And $MINI_GUI_dif < $Wait/4 Then
Do
WinSetTrans("MINI_GUI", "", $MINI_GUI_Transwert)
Sleep(10)
$MINI_GUI_Transwert = $MINI_GUI_Transwert - 1
Until $MINI_GUI_Transwert = 200
EndIf
If $aMousePos1[0] > $aWinPos1[0] AND $aMousePos1[0] < $aWinPos1[0] + 250 AND $aMousePos1[1] > $aWinPos1[1] AND $aMousePos1[1] < $aWinPos1[1] + 200 Then
$MINI_GUI_begin = TimerInit()
If $MINI_GUI_Transwert < 255 Then
Do
WinSetTrans("MINI_GUI", "", $MINI_GUI_Transwert)
Sleep(10)
$MINI_GUI_Transwert = $MINI_GUI_Transwert + 1
Until $MINI_GUI_Transwert = 255
EndIf
EndIf
Until $MINI_GUI_dif > $Wait
Do
WinSetTrans("MINI_GUI", "", $MINI_GUI_Transwert)
Sleep(10)
$MINI_GUI_Transwert = $MINI_GUI_Transwert - 1
Until $MINI_GUI_Transwert = 0
GUIDelete($MINI_GUI)
EndFunc