Tastatur und Maus während der Installation sperren ?

  • Hallo Leute,

    ich möchte bei der Installation der Programme die Tastatur und Maus sperren.
    Erst wenn das MsgBox "Status der CAD-Installation" kommt, dann soll die Tastatur und Maus entsperrt werden.

    Was mache ich hier falsch:

    [autoit]

    ;Sperren Tastatur und Maus
    Blockinput(1)
    ;~ 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
    MsgBox(0,"Status der CAD-Installation","Folgende Programme wurden erfolgreich installiert:"&@CRLF&"-------------------------------------------------------------"&@CRLF&"PlotFlow"&@CRLF&"Sikla")
    If WinWait("Status der CAD-Installation","Folgende Programme wurden erfolgreich installiert:") Then
    ;Entsperren Tastatur und Maus
    Blockinput(0)
    EndIf

    [/autoit]


    Besten Dank im Voraus!

    Viele Grüße,
    Dino

    • Offizieller Beitrag

    Wie soll BlockInput(0) auch ausgeführt werden, wenn das Script vorher auf das beenden der MsgBox wartet?
    Diese kann aber nicht beendet werden, weil die Tastatur und Maus gesperrt sind = Teufelskreis.

    Das müsste also wohl eher so aussehen:

    Spoiler anzeigen
    [autoit]


    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")

    [/autoit]
  • Super Oscar, es funktioniert prima... Danke !
    Danke auch an alle andere :)

    Noch eine Frage:
    Gibt es die Möglichkeit in einem MsgBox oder noch besser einem UDF dies "Bitte warten Sie bis die Programme installiert sind. Die Tatstur und Maus sind solange gesperrt!" oben links im Fenster solange anzuzeigen bis Tastatur und Maus entspert sind?

    VG,
    Dino

  • Kannst ja den Title des Fenster ändern mit WinSetTitle... oder SplashTextOn, oder einfach selber ne GUI machen.

    oder MiniGUI, weis nicht mehr von wem die war, ist aber sehr schön für kurze Nachrichten:

    Spoiler anzeigen
    [autoit]

    _MiniGUI("Hallo Welt", "Hallo Welt!", 10000, 0x000000, 0xFFFFFF)

    [/autoit] [autoit][/autoit] [autoit]

    Func _MiniGUI($Titel, $Text, $Wait, $Color1, $Color2)
    $MINI_GUI_Transwert = 255
    $MINI_GUI_dif = 0

    [/autoit] [autoit][/autoit] [autoit]

    $MINI_GUI = GUICreate("MINI_GUI", 250, 200, @DesktopWidth - 270, @DesktopHeight, 0x80000000, 0x00000080)
    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)

    [/autoit] [autoit][/autoit] [autoit]

    $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)

    [/autoit] [autoit][/autoit] [autoit]

    $MINI_GUI_begin = TimerInit()

    [/autoit] [autoit][/autoit] [autoit]

    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

    [/autoit] [autoit][/autoit] [autoit]

    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

    [/autoit]

    Der_Doc:

    Zitat

    Die if-schleife würde ich rausnehmen.

    Mein Lehrer würde dich jetzt tot hauen :rofl:

  • Ich nutze für sowas auch immer SplashText. Da kannst du einblenden lassen was du möchtest, und das liegt im Vordergrund.
    So mußst du deinen Rechenr auch net neustarten, wenn mal was net so funktioniert.

    PS: Splashoff net vergessen.
    MfG
    Der_Doc

  • Super, werde ich alle Möglichkeiten testen. Danke an alle !

    Greek:
    1. Kann ich bei _MiniGUI das Fenster in Mitte anzeigen (nicht unten rechts) ?
    2. Wo kann ich genau die Größe des Fensters definieren? z.b. doppelte Größe als jetzt !

    Besten Dank!

    VG,
    Dino

  • Da musst du die UDF anpassen,

    hab dir die Zeilen makiert,

    Spoiler anzeigen
    [autoit]

    _MiniGUI("Hallo Welt", "Hallo Welt!", 10000, 0x000000, 0xFFFFFF)

    [/autoit] [autoit][/autoit] [autoit]

    Func _MiniGUI($Titel, $Text, $Wait, $Color1, $Color2)
    $MINI_GUI_Transwert = 255
    $MINI_GUI_dif = 0

    [/autoit] [autoit][/autoit] [autoit]

    $MINI_GUI = GUICreate("MINI_GUI", 250, 200, @DesktopWidth/2 - 270, @DesktopHeight/2, 0x80000000, 0x00000080); Hier anpassen
    GUISetState(@SW_SHOW, $MINI_GUI)
    GUISetBkColor($Color1, $MINI_GUI)

    [/autoit] [autoit][/autoit] [autoit]

    $MINI_GUI_Titel = GUICtrlCreateLabel($Titel, 50, 20, 150)
    GUICtrlSetFont($MINI_GUI_Titel, 16)
    GUICtrlSetColor($MINI_GUI_Titel, $Color2)

    [/autoit] [autoit][/autoit] [autoit]

    $MINI_GUI_Text = GUICtrlCreateLabel($Text, 50, 65)
    GUICtrlSetColor($MINI_GUI_Text, $Color2)

    [/autoit] [autoit][/autoit] [autoit]

    $MINI_GUI_Line1 = GUICtrlCreateLabel ("", 0, 0, 250, 1)
    GUICtrlSetColor($MINI_GUI_Line1, $Color2)
    GUICtrlSetBkColor($MINI_GUI_Line1, $Color2)

    [/autoit] [autoit][/autoit] [autoit]

    $MINI_GUI_Line2 = GUICtrlCreateLabel ("", 0, 0, 1, 200)
    GUICtrlSetColor($MINI_GUI_Line2, $Color2)
    GUICtrlSetBkColor($MINI_GUI_Line2, $Color2)

    [/autoit] [autoit][/autoit] [autoit]

    $MINI_GUI_Line3 = GUICtrlCreateLabel ("", 249, 0, 1, 200)
    GUICtrlSetColor($MINI_GUI_Line3, $Color2)
    GUICtrlSetBkColor($MINI_GUI_Line3, $Color2)

    [/autoit] [autoit][/autoit] [autoit]

    $MINI_GUI_LineMiddle = GUICtrlCreateLabel ("", 25, 50, 200, 3)
    GUICtrlSetColor($MINI_GUI_LineMiddle, $Color2)
    GUICtrlSetBkColor($MINI_GUI_LineMiddle, $Color2)

    [/autoit] [autoit][/autoit] [autoit]

    WinMove ( "MINI_GUI", "", @DesktopWidth/2 - 270, @DesktopHeight/2 - 200, 250, 200, 5) ; Hier anpassen, (nochmal das selbe rein)

    [/autoit] [autoit][/autoit] [autoit]

    $MINI_GUI_begin = TimerInit()

    [/autoit] [autoit][/autoit] [autoit]

    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

    [/autoit] [autoit][/autoit] [autoit]

    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

    [/autoit]
  • 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

    Einmal editiert, zuletzt von Dino (16. November 2009 um 20:31)

  • jup :

    Spoiler anzeigen
    [autoit]

    _MiniGUI("Hinweis", "Bitte warten Sie bis die Programme installiert sind. Die Tastatur und Maus sind solange gesperrt!", 1000, 0x006000, 0xFFFFFF)

    [/autoit] [autoit][/autoit] [autoit]

    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

    [/autoit] [autoit][/autoit] [autoit]

    Sleep ( 3000 )

    [/autoit] [autoit][/autoit] [autoit]

    Blockinput(0);Entsperren Tastatur und Maus

    [/autoit] [autoit][/autoit] [autoit]

    Do
    WinSetTrans("MINI_GUI", "", $MINI_GUI_Transwert)
    Sleep(10)
    $MINI_GUI_Transwert = $MINI_GUI_Transwert - 1
    Until $MINI_GUI_Transwert = 0
    GUIDelete($MINI_GUI)

    [/autoit] [autoit][/autoit] [autoit]

    MsgBox(0,"Status der CAD-Installation","Folgende Programme wurden erfolgreich installiert:"&@CRLF&"-------------------------------------------------------------"&@CRLF&"PlotFlow"&@CRLF&"Sikla")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _MiniGUI($Titel, $Text, $Wait, $Color1, $Color2)
    Global $MINI_GUI_Transwert = 255
    $MINI_GUI_dif = 0

    [/autoit] [autoit][/autoit] [autoit]

    ;~ $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

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState(@SW_SHOW, $MINI_GUI)
    GUISetBkColor($Color1, $MINI_GUI)

    [/autoit] [autoit][/autoit] [autoit]

    $MINI_GUI_Titel = GUICtrlCreateLabel($Titel, 50, 20, 150)
    GUICtrlSetFont($MINI_GUI_Titel, 16)
    GUICtrlSetColor($MINI_GUI_Titel, $Color2)

    [/autoit] [autoit][/autoit] [autoit]

    $MINI_GUI_Text = GUICtrlCreateLabel($Text, 50, 65)
    GUICtrlSetColor($MINI_GUI_Text, $Color2)

    [/autoit] [autoit][/autoit] [autoit]

    $MINI_GUI_Line1 = GUICtrlCreateLabel ("", 0, 0, 250, 1)
    GUICtrlSetColor($MINI_GUI_Line1, $Color2)
    GUICtrlSetBkColor($MINI_GUI_Line1, $Color2)

    [/autoit] [autoit][/autoit] [autoit]

    $MINI_GUI_Line2 = GUICtrlCreateLabel ("", 0, 0, 1, 200)
    GUICtrlSetColor($MINI_GUI_Line2, $Color2)
    GUICtrlSetBkColor($MINI_GUI_Line2, $Color2)

    [/autoit] [autoit][/autoit] [autoit]

    $MINI_GUI_Line3 = GUICtrlCreateLabel ("", 249, 0, 1, 200)
    GUICtrlSetColor($MINI_GUI_Line3, $Color2)
    GUICtrlSetBkColor($MINI_GUI_Line3, $Color2)

    [/autoit] [autoit][/autoit] [autoit]

    $MINI_GUI_LineMiddle = GUICtrlCreateLabel ("", 25, 50, 200, 3)
    GUICtrlSetColor($MINI_GUI_LineMiddle, $Color2)
    GUICtrlSetBkColor($MINI_GUI_LineMiddle, $Color2)

    [/autoit] [autoit][/autoit] [autoit]

    ;~ 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)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $MINI_GUI_begin = TimerInit()

    [/autoit] [autoit][/autoit] [autoit]

    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

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit]
  • Hi Greek,

    durch Testen, habe ich diesen Abschnitt ohne Absicht auskommentiert. ;)

    [autoit]

    MsgBox(0, "CAD-Installation", "Installation PlotFlow", 3)
    ShellExecuteWait("C:\install\PlotFlow.exe")
    MsgBox(0, "CAD-Installation", "Installation Sikla", 3)
    ShellExecuteWait("C:\install\Sikla.exe")

    [/autoit]

    Das ist die aktuelle Version:

    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

    Sleep ( 3000 )

    Blockinput(0);Entsperren Tastatur und Maus

    Do
    WinSetTrans("MINI_GUI", "", $MINI_GUI_Transwert)
    Sleep(10)
    $MINI_GUI_Transwert = $MINI_GUI_Transwert - 1
    Until $MINI_GUI_Transwert = 0
    GUIDelete($MINI_GUI)

    MsgBox(0,"Status der CAD-Installation","Folgende Programme wurden erfolgreich installiert:"&@CRLF&"-------------------------------------------------------------"&@CRLF&"PlotFlow"&@CRLF&"Sikla")


    Func _MiniGUI($Titel, $Text, $Wait, $Color1, $Color2)
    Global $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

    EndFunc

    Dies wird nicht angezeigt:

    [autoit]

    MsgBox(0,"Status der CAD-Installation","Folgende Programme wurden erfolgreich installiert:"&@CRLF&"-------------------------------------------------------------"&@CRLF&"PlotFlow"&@CRLF&"Sikla")

    [/autoit]

    Das hier steht unten im Fenster:

  • Also bei mir wird die MsgBox angezeigt... und die Warnungen kannste wegkriegen, indem du direkt am Anfang die Variablen $MINI_GUI und $MINI_GUI_Transwert global definierst:

    [autoit]

    Global $MINI_GUI, $MINI_GUI_Transwert

    [/autoit]