Script funktioniert auf Vista nicht...

  • Hallo,

    ich bin endlich fertig mit meinem Script jetzt. auf meinem System Win7 funktioniert es super, aber auf Windows Vista geht es nicht aber da soll es auch funktionieren, könnt mir da jemand helfen dass es auf Win Vista funktioniert?
    hier das Script:

    Spoiler anzeigen
    [autoit]


    #AutoIt3Wrapper_OutFile=New-Year-Countdown.scr
    #AutoIt3Wrapper_Run_Obfuscator=y
    #Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0
    #AutoIt3Wrapper_Run_After=del /f /q "%scriptdir%\%scriptfile%_Obfuscated.au3"
    #AutoIt3Wrapper_UseX64=n
    #AutoIt3Wrapper_Res_Description=Professional Screensaver made by (C) Clemens 2012
    #AutoIt3Wrapper_Res_Fileversion=1.0.0.0
    #AutoIt3Wrapper_Res_Language=1033
    #AutoIt3Wrapper_Res_Field=Version|1.0.0
    #AutoIt3Wrapper_Res_Field=Build|2012-24-12
    #AutoIt3Wrapper_Res_Field=Coded by| (C) Clemens
    #AutoIt3Wrapper_Res_Field=Compile date|%longdate% %time%
    #AutoIt3Wrapper_Run_After=upx.exe --best --lzma "%out%"
    ;#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6

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

    #include <GDIPlus.au3>
    #include <Date.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <EditConstants.au3>
    #include <GDIPlus.au3>
    #include <GUIConstantsEx.au3>
    #include <Misc.au3>
    #include <SliderConstants.au3>
    #include <StaticConstants.au3>
    #include <Timers.au3>
    #include <WinAPI.au3>
    #include <WindowsConstants.au3>
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GuiListView.au3>
    #include <GuiImageList.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

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

    Opt('MustDeclareVars', 1)
    Opt('GUIOnEventMode', 1)

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

    ;=================================================================
    ; Windows-Tools
    ;=================================================================

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

    _Singleton(@AutoItExe)

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

    Dim $iCount = 10, $iExplosion = 100, $iExplosionGround = 1, $iRadius = 600, $iBack = 0x09000000, $iSleep = 5

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

    Global Const $app_name = "GDI+ Countdown-Screensaver by (C) Clemens 2012"
    Global Const $ver = "v1.0 build 2012-11-24"
    Global $hGUI, $iW, $iH, $GUI_H, $GUI_W, $GUI_X, $GUI_Y, $r, $show_FPS = 0
    Global $maxStars = 150, $size = 1
    Global $parent_pid, $aChildProcess
    Global Const $hFullScreen = WinGetHandle("Program Manager")
    Global Const $aFullScreen = WinGetPos($hFullScreen)
    Global $main_screen_x = Abs($aFullScreen[0])
    Global Const $ini_file = @ScriptDir & "\GDI+ Countdown-Screensaver.ini"
    ;If FileExists($ini_file) Then
    ; $iColor_BG = IniRead($ini_file, "Settings", "bgcolor", 0xFF008000)
    ; $iColor_TextFill = IniRead($ini_file, "Settings", "txtcolor", 0xFFFFAA00)
    ;EndIf

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

    Global $cmdparam = "/s"
    If $CmdLine[0] Then $cmdparam = StringLeft($CmdLine[1], 2)

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

    Switch $cmdparam
    Case "/s"
    $iW = @DesktopWidth
    $iH = @DesktopHeight
    $GUI_X = $aFullScreen[0]
    $GUI_Y = $aFullScreen[1]
    $GUI_W = $aFullScreen[2]
    $GUI_H = $aFullScreen[3]
    $r = (($iW + $iH) / 2) / 0x300
    $hGUI = GUICreate($app_name, $GUI_W, $GUI_H, $GUI_X, $GUI_Y, $WS_POPUP, $WS_EX_TOPMOST)
    Case "/c"
    Opt("GUIOnEventMode", 0)
    ;============================================================================================
    ;+++++++++++++++++++++++++++ E I N S T E L L T O O L . A U 3 ++++++++++++++++++++++++++++++++
    ;============================================================================================

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

    Global $Form1, $hImage1, $hImage2, $hlist1, $hCombo2
    Local $Form1
    Local $Label1
    Local $hListView1
    Local $hListView2
    Local $hImage1
    Local $hImage2
    Local $Label1
    Local $Label2
    Local $Label3
    Local $Button1
    Local $Button2

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Einstellungen", 284, 388, 192, 124)
    $Label1 = GUICtrlCreateLabel("Hier können Sie die Einstellungen vornehmen!", 8, 8, 266, 17)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Label2 = GUICtrlCreateLabel("HintergrundFarbe:", 8, 48, 114, 17)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Label3 = GUICtrlCreateLabel("TextFarbe:", 8, 200, 65, 17)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Button1 = GUICtrlCreateButton("Abbrechen", 56, 352, 75, 25)
    $Button2 = GUICtrlCreateButton("Übernehmen", 144, 352, 75, 25)
    ;$List1 = GUICtrlCreateList("", 8, 80, 265, 97)
    $hListView1 = GUICtrlCreateListView("", 8, 80, 265, 97)

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

    ; Load images
    $hImage1 = _GUIImageList_Create()
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0xFFFFFF, 16, 16))
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0xFF0000, 16, 16))
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0x00FF00, 16, 16))
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0x0000FF, 16, 16))
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0x000000, 16, 16))
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0x800000, 16, 16)); Maroon
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0x8B0000, 16, 16)); DarkRed
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0xB22222, 16, 16)); FireBrick
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0xFA8072, 16, 16)); Salmon
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0xFF4500, 16, 16)); OrangeRed
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0xD2691E, 16, 16)); Chocolate
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0xFF8C00, 16, 16)); DarkOrange
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0xFFA500, 16, 16)); Orange
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0xFFD700, 16, 16)); Gold
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0xFFFF00, 16, 16)); Yellow
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0x9ACD32, 16, 16)); $YellowGreen =
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0xADFF2F, 16, 16)); $GreenYellow =
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0x008000, 16, 16)); $Green =
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0x000080, 16, 16)); $Navy =
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0x800080, 16, 16)); $Purple =
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0xDC143C, 16, 16)); $Crimson =
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0xA52A2A, 16, 16)); $Brown =
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0x808080, 16, 16)); $Gray =
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0xC0C0C0, 16, 16)); $Silver =
    _GUIImageList_Add($hImage1, _GUICtrlListView_CreateSolidBitMap($hListView1, 0xD3D3D3, 16, 16)); $LightGray =
    _GUICtrlListView_SetImageList($hListView1, $hImage1, 1)

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

    ; Add columns
    _GUICtrlListView_AddColumn($hListView1, "Hintergrundfarbe", 200)

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

    ; Add items
    _GUICtrlListView_AddItem($hListView1, "Farbe belassen", 0)
    _GUICtrlListView_AddItem($hListView1, "Rot", 1)
    _GUICtrlListView_AddItem($hListView1, "Grün", 2)
    _GUICtrlListView_AddItem($hListView1, "Blau", 3)
    _GUICtrlListView_AddItem($hListView1, "Schwarz", 4)
    _GUICtrlListView_AddItem($hListView1, "Maroon", 5);
    _GUICtrlListView_AddItem($hListView1, "DarkRed", 6);
    _GUICtrlListView_AddItem($hListView1, "FireBrick", 7);
    _GUICtrlListView_AddItem($hListView1, "Salmon", 8);
    _GUICtrlListView_AddItem($hListView1, "OrangeRed", 9);
    _GUICtrlListView_AddItem($hListView1, "Chocolate", 10);
    _GUICtrlListView_AddItem($hListView1, "DarkOrange", 11);
    _GUICtrlListView_AddItem($hListView1, "Orange", 12);
    _GUICtrlListView_AddItem($hListView1, "Gold", 13);
    _GUICtrlListView_AddItem($hListView1, "Yellow", 14);
    _GUICtrlListView_AddItem($hListView1, "YellowGreen", 15); $ = 0x9ACD32
    _GUICtrlListView_AddItem($hListView1, "GreenYellow", 16); $ = 0xADFF2F
    _GUICtrlListView_AddItem($hListView1, "Green", 17); $ = 0x008000
    _GUICtrlListView_AddItem($hListView1, "Navy", 18); $ = 0x000080
    _GUICtrlListView_AddItem($hListView1, "Purple", 19); $ = 0x800080
    _GUICtrlListView_AddItem($hListView1, "Crimson", 20); $ = 0xDC143C
    _GUICtrlListView_AddItem($hListView1, "Brown", 21); $ = 0xA52A2A
    _GUICtrlListView_AddItem($hListView1, "Gray", 22); $ = 0x808080
    _GUICtrlListView_AddItem($hListView1, "Silver", 23); $ = 0xC0C0C0
    _GUICtrlListView_AddItem($hListView1, "LightGray", 24); $ = 0xD3D3D3

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

    ;$List2 = GUICtrlCreateList("", 8, 232, 265, 97)
    $hListView2 = GUICtrlCreateListView("", 8, 232, 265, 97)

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

    ; Load images
    $hImage2 = _GUIImageList_Create()
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0xFFFFFF, 16, 16))
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0xFF0000, 16, 16))
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0x00FF00, 16, 16))
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0x0000FF, 16, 16))
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0x000000, 16, 16))
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0x800000, 16, 16)); Maroon
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0x8B0000, 16, 16)); DarkRed
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0xB22222, 16, 16)); FireBrick
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0xFA8072, 16, 16)); Salmon
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0xFF4500, 16, 16)); OrangeRed
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0xD2691E, 16, 16)); Chocolate
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0xFF8C00, 16, 16)); DarkOrange
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0xFFA500, 16, 16)); Orange
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0xFFD700, 16, 16)); Gold
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0xFFFF00, 16, 16)); Yellow
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0x9ACD32, 16, 16)); $YellowGreen =
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0xADFF2F, 16, 16)); $GreenYellow =
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0x008000, 16, 16)); $Green =
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0x000080, 16, 16)); $Navy =
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0x800080, 16, 16)); $Purple =
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0xDC143C, 16, 16)); $Crimson =
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0xA52A2A, 16, 16)); $Brown =
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0x808080, 16, 16)); $Gray =
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0xC0C0C0, 16, 16)); $Silver =
    _GUIImageList_Add($hImage2, _GUICtrlListView_CreateSolidBitMap($hListView2, 0xD3D3D3, 16, 16)); $LightGray =
    _GUICtrlListView_SetImageList($hListView2, $hImage2, 1)

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

    ; Add columns
    _GUICtrlListView_AddColumn($hListView2, "Textfarbe", 200)

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

    ; Add items
    _GUICtrlListView_AddItem($hListView2, "Eingestellte Farbe", 0)
    _GUICtrlListView_AddItem($hListView2, "Rot", 1)
    _GUICtrlListView_AddItem($hListView2, "Grün", 2)
    _GUICtrlListView_AddItem($hListView2, "Blau", 3)
    _GUICtrlListView_AddItem($hListView2, "Schwarz", 4)
    _GUICtrlListView_AddItem($hListView2, "Maroon", 5);
    _GUICtrlListView_AddItem($hListView2, "DarkRed", 6);
    _GUICtrlListView_AddItem($hListView2, "FireBrick", 7);
    _GUICtrlListView_AddItem($hListView2, "Salmon", 8);
    _GUICtrlListView_AddItem($hListView2, "OrangeRed", 9);
    _GUICtrlListView_AddItem($hListView2, "Chocolate", 10);
    _GUICtrlListView_AddItem($hListView2, "DarkOrange", 11);
    _GUICtrlListView_AddItem($hListView2, "Orange", 12);
    _GUICtrlListView_AddItem($hListView2, "Gold", 13);
    _GUICtrlListView_AddItem($hListView2, "Yellow", 14);
    _GUICtrlListView_AddItem($hListView2, "YellowGreen", 15); $ = 0x9ACD32
    _GUICtrlListView_AddItem($hListView2, "GreenYellow", 16); $ = 0xADFF2F
    _GUICtrlListView_AddItem($hListView2, "Green", 17); $ = 0x008000
    _GUICtrlListView_AddItem($hListView2, "Navy", 18); $ = 0x000080
    _GUICtrlListView_AddItem($hListView2, "Purple", 19); $ = 0x800080
    _GUICtrlListView_AddItem($hListView2, "Crimson", 20); $ = 0xDC143C
    _GUICtrlListView_AddItem($hListView2, "Brown", 21); $ = 0xA52A2A
    _GUICtrlListView_AddItem($hListView2, "Gray", 22); $ = 0x808080
    _GUICtrlListView_AddItem($hListView2, "Silver", 23); $ = 0xC0C0C0
    _GUICtrlListView_AddItem($hListView2, "LightGray", 24); $ = 0xD3D3D3

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

    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    Local $nMsg
    Local $bgcolor
    Local $txtcolor
    Local $hListView1
    Local $hListView2
    Local $i
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    Case $Button1
    Exit
    Case $Button2

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

    $bgcolor = _GUICtrlListView_GetSelectedIndices($hListView1)
    If $bgcolor = 1 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90FF0000")
    ElseIf $bgcolor = 2 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x9000FF00")
    ElseIf $bgcolor = 3 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x900000FF")
    ElseIf $bgcolor = 4 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90000000")
    ElseIf $bgcolor = 5 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90800000"); Maroon
    ElseIf $bgcolor = 6 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x908B0000"); DarkRed
    ElseIf $bgcolor = 7 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90B22222"); FireBrick
    ElseIf $bgcolor = 8 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90FA8072"); Salmon
    ElseIf $bgcolor = 9 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90FF4500"); OrangeRed
    ElseIf $bgcolor = 10 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90D2691E"); Chocolate
    ElseIf $bgcolor = 11 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90FF8C00"); DarkOrange
    ElseIf $bgcolor = 12 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90FFA500"); Orange
    ElseIf $bgcolor = 13 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90FFD700"); Gold
    ElseIf $bgcolor = 14 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90FFFF00"); Yellow
    ElseIf $bgcolor = 15 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x909ACD32"); $YellowGreen =
    ElseIf $bgcolor = 16 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90ADFF2F"); $GreenYellow =
    ElseIf $bgcolor = 17 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90008000"); $Green =
    ElseIf $bgcolor = 18 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90000080"); $Navy =
    ElseIf $bgcolor = 19 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90800080"); $Purple =
    ElseIf $bgcolor = 20 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90DC143C"); $Crimson =
    ElseIf $bgcolor = 21 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90A52A2A"); $Brown =
    ElseIf $bgcolor = 22 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90808080"); $Gray =
    ElseIf $bgcolor = 23 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90C0C0C0"); $Silver =
    ElseIf $bgcolor = 24 Then
    IniWrite($ini_file, "Settings", "bgcolor", "0x90D3D3D3"); $LightGray =
    ElseIf $bgcolor = 0 Then
    For $i = 0 To 23
    _GUICtrlListView_SetItemChecked($hListView1, $i, False)
    Next

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

    EndIf

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

    $txtcolor = _GUICtrlListView_GetSelectedIndices($hListView2)
    If $txtcolor = 1 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFFFF0000")
    ElseIf $txtcolor = 2 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFF00FF00")
    ElseIf $txtcolor = 3 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFF0000FF")
    ElseIf $txtcolor = 4 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFF000000")
    ElseIf $txtcolor = 5 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFF800000"); Maroon
    ElseIf $txtcolor = 6 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFF8B0000"); DarkRed
    ElseIf $txtcolor = 7 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFFB22222"); FireBrick
    ElseIf $txtcolor = 8 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFFFA8072"); Salmon
    ElseIf $txtcolor = 9 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFFFF4500"); OrangeRed
    ElseIf $txtcolor = 10 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFFD2691E"); Chocolate
    ElseIf $txtcolor = 11 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFFFF8C00"); DarkOrange
    ElseIf $txtcolor = 12 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFFFFA500"); Orange
    ElseIf $txtcolor = 13 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFFFFD700"); Gold
    ElseIf $txtcolor = 14 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFFFFFF00"); Yellow
    ElseIf $txtcolor = 15 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFF9ACD32"); $YellowGreen =
    ElseIf $txtcolor = 16 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFFADFF2F"); $GreenYellow =
    ElseIf $txtcolor = 17 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFF008000"); $Green =
    ElseIf $txtcolor = 18 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFF000080"); $Navy =
    ElseIf $txtcolor = 19 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFF800080"); $Purple =
    ElseIf $txtcolor = 20 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFFDC143C"); $Crimson =
    ElseIf $txtcolor = 21 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFFA52A2A"); $Brown =
    ElseIf $txtcolor = 22 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFF808080"); $Gray =
    ElseIf $txtcolor = 23 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFFC0C0C0"); $Silver =
    ElseIf $txtcolor = 24 Then
    IniWrite($ini_file, "Settings", "txtcolor", "0xFFD3D3D3"); $LightGray =
    ElseIf $txtcolor = 0 Then
    For $e = 1 To 24
    _GUICtrlListView_SetItemChecked($hListView2, $e, False)
    Next
    EndIf

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

    Exit

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

    EndSwitch
    WEnd
    ;===========================================================================================
    Exit

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

    Case "/p"
    $iW = 152
    $iH = 112
    $GUI_X = 0
    $GUI_Y = 0
    $GUI_W = $iW
    $GUI_H = $iH
    $main_screen_x = 0
    $r = (($iW + $iH) / 2) / 0x30
    $show_FPS = False
    ;$maxStars = 30
    $size = 1
    $hGUI = GUICreate("GDI+ Countdown-Screensaver by (C) Clemens", $GUI_W, $GUI_H, $GUI_X, $GUI_Y, $WS_POPUP)
    _WinAPI_SetParent($hGUI, $CmdLine[2])
    ;$parent_pid = _WinAPI_GetParentProcess(@AutoItPID)
    Exit
    EndSwitch

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

    ;==================================================================

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

    _GDIPlus_Startup()

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

    Global $iWidth = @DesktopWidth
    Global $iHeight = @DesktopHeight

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

    Global $days, $hour, $hour2, $Mins, $secs

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

    Global $iColor_BG = IniRead($ini_file, "Settings", "bgcolor", 0x000000)
    Global $iColor_TextFill = IniRead($ini_file, "Settings", "txtcolor", 0x000000)

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

    ;Global $iColor_BG = 0xFF008000
    ;Global $iColor_TextFill = 0xFFFFAA00
    Global $iColor_TextFill2 = 0xFFFF0000
    Global $iColor_TextFill3 = 0xFF0000FF
    Global $iColor_TextFill4 = 0xFF353535
    Global $iColor_TextBorder = 0xFFA00000

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

    ;Global $hGui = GUICreate("GDI+", $iWidth, $iHeight)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
    Global $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI)
    Global $hBmpBuffer = _GDIPlus_BitmapCreateFromGraphics($iWidth, $iHeight, $hGraphics)
    Global $hGfxBuffer = _GDIPlus_ImageGetGraphicsContext($hBmpBuffer)
    _GDIPlus_GraphicsSetSmoothingMode($hGfxBuffer, 2)
    _GDIPlus_GraphicsClear($hGfxBuffer, $iColor_BG)

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

    Global $hPen = _GDIPlus_PenCreate($iColor_TextBorder, 3)
    DllCall($ghGDIPDll, "uint", "GdipSetPenLineJoin", "hwnd", $hPen, "int", 2)
    Global $hBrush = _GDIPlus_BrushCreateSolid($iColor_TextFill)
    Global $day, $hour, $hour2, $Mins, $secs

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

    ;GUIRegisterMsg(15, "WM_PAINT")
    GUIRegisterMsg($WM_PAINT, "WM_PAINT")
    GUIRegisterMsg($WM_ERASEBKGND, "WM_ERASEBKGND")

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

    GUISetState()

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

    Global $hMatrix = _GDIPlus_MatrixCreate()
    Global $tLayout = _GDIPlus_RectFCreate(0, 0, 0, 0)
    Global $hFormat = _GDIPlus_StringFormatCreate()
    Global $hFamily = _GDIPlus_FontFamilyCreate("Arial")
    Global $hPath = _CreatePath("88 - 88:88:88")

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

    Global $sText, $sTextOld
    Global $fStep = 0

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

    While 1
    GUISetCursor(16, 1, $hGUI)
    _TicksToTime(_DateDiff('s', _NowCalc(), "2013/01/01 00:00:00") * 1000, $hour, $Mins, $secs)
    If $hour >23 Then
    $days = StringFormat("%02i", $hour / 24); volle Tage
    $hour = $hour - ($days*24); volle Tage abziehen
    Else
    $days = 0
    EndIf

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

    If $sText = "00 - 00:00:00" Then
    ; Funktion Feuerwerk soll dann ausgeführt werden
    Feuerwerk()
    Else

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

    $sText = StringFormat("%02i - %02i:%02i:%02i", $days, $hour, $Mins, $secs)
    EndIf

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

    If $sText <> $sTextOld Then
    $sTextOld = $sText
    DllCall($ghGDIPDll, "uint", "GdipResetPath", "hwnd", $hPath)
    DllCall($ghGDIPDll, "uint", "GdipAddPathString", "hwnd", $hPath, "wstr", $sText, "int", -1, "hwnd", $hFamily, "int", 1, "float", 100, "ptr", DllStructGetPtr($tLayout), "hwnd", $hFormat)
    DllCall($ghGDIPDll, "uint", "GdipTransformPath", "hwnd", $hPath, "hwnd", $hMatrix)
    EndIf

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

    $fStep += 0.01
    _Draw(Abs(Sin($fStep)))
    Sleep(10)
    WEnd

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

    Func _Draw($fScale)
    _GDIPlus_GraphicsClear($hGfxBuffer, $iColor_BG)

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

    DllCall($ghGDIPDll, "uint", "GdipTranslateWorldTransform", "hwnd", $hGfxBuffer, "float", -$iWidth / 2, "float", -$iHeight / 2, "int", False)
    DllCall($ghGDIPDll, "uint", "GdipScaleWorldTransform", "hwnd", $hGfxBuffer, "float", $fScale, "float", $fScale, "int", True)
    DllCall($ghGDIPDll, "uint", "GdipTranslateWorldTransform", "hwnd", $hGfxBuffer, "float", $iWidth / 2, "float", $iHeight / 2, "int", True)

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

    DllCall($ghGDIPDll, "uint", "GdipDrawPath", "hwnd", $hGfxBuffer, "hwnd", $hPen, "hwnd", $hPath)
    DllCall($ghGDIPDll, "uint", "GdipFillPath", "hwnd", $hGfxBuffer, "hwnd", $hBrush, "hwnd", $hPath)

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

    DllCall($ghGDIPDll, "uint", "GdipResetWorldTransform", "hwnd", $hGfxBuffer)

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

    _GDIPlus_GraphicsDrawImage($hGraphics, $hBmpBuffer, 0, 0)
    EndFunc ;==>_Draw

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

    Func _CreatePath($sText)

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

    Local $tBounds = _GDIPlus_RectFCreate(0, 0, 0, 0)

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

    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreatePath", "int", 0, "int*", 0)
    If @error Or Not IsArray($aResult) Then Return SetError(1, 1, False)
    Local $hPath = $aResult[2]

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

    DllCall($ghGDIPDll, "uint", "GdipAddPathString", "hwnd", $hPath, "wstr", $sText, "int", -1, "hwnd", $hFamily, "int", 1, "float", 100, "ptr", DllStructGetPtr($tLayout), "hwnd", $hFormat)
    DllCall($ghGDIPDll, "uint", "GdipGetPathWorldBounds", "hwnd", $hPath, "ptr", DllStructGetPtr($tBounds), "hwnd", 0, "hwnd", 0)

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

    _GDIPlus_MatrixTranslate($hMatrix, -DllStructGetData($tBounds, "X"), -DllStructGetData($tBounds, "Y"))
    _GDIPlus_MatrixScale($hMatrix, $iWidth / DllStructGetData($tBounds, "Width"), $iHeight / DllStructGetData($tBounds, "Height"), True)
    DllCall($ghGDIPDll, "uint", "GdipTransformPath", "hwnd", $hPath, "hwnd", $hMatrix)

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

    Return $hPath
    EndFunc ;==>_CreatePath

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

    Func WM_PAINT($hWnd, $uMsgm, $wParam, $lParam)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBmpBuffer, 0, 0)
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_PAINT

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

    Func WM_ERASEBKGND($hWnd, $uMsgm, $wParam, $lParam)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBmpBuffer, 0, 0)
    Return True
    EndFunc ;==>WM_ERASEBKGND

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

    Func _Exit()
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    DllCall($ghGDIPDll, "uint", "GdipDeletePath", "hwnd", $hPath)
    _GDIPlus_PenDispose($hPen)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDispose($hGfxBuffer)
    _GDIPlus_BitmapDispose($hBmpBuffer)
    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_Shutdown()
    Exit
    EndFunc

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

    ;=============================================================================
    ;+++++++++++++++++++++++ F E U E R W E R K . A U 3 +++++++++++++++++++++++++++
    ;=============================================================================
    #cs
    Dim $aDraw
    Dim $iCount = 10, $iExplosion = 100, $iExplosionGround = 1, $iRadius = 600, $iBack = 0x90000000, $iSleep = 5
    Local $iSleep = 0
    Global $iWidth2 = @DesktopWidth, $iHeight2 = @DesktopHeight, $aStart[$iCount][4] = [[Random(0, $iWidth2, 0), Random(0, $iHeight2, 0), 0, _GDIPlus_PenCreate(Random(0xFF000000, 0xFFFFFFFF, 0))],[Random(0, $iWidth2, 0), Random(0, $iHeight2, 0), 0, _GDIPlus_PenCreate(Random(0xFF000000, 0xFFFFFFFF, 0))]], $iSleeping = 0
    For $i = 0 To UBound($aStart) - 1
    $aStart[$i][0] = Random(0, $iWidth2, 0)
    $aStart[$i][1] = Random(0, $iHeight2, 0)
    $aStart[$i][2] = $iExplosion
    $aStart[$i][3] = _GDIPlus_PenCreate(Random(0xFF000000, 0xFFFFFFFF, 0))
    Next
    #Ce

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

    Func Feuerwerk()
    Local $aDraw
    Local $iCount = 10, $iExplosion = 100, $iExplosionGround = 1, $iRadius = 600, $iBack = 0x09000000, $iSleep = 5
    Global $iWidth2 = @DesktopWidth, $iHeight2 = @DesktopHeight, $aStart[$iCount][4] = [[Random(0, $iWidth2, 0), Random(0, $iHeight2, 0), 0, _GDIPlus_PenCreate(Random(0xFF000000, 0xFFFFFFFF, 0))],[Random(0, $iWidth2, 0), Random(0, $iHeight2, 0), 0, _GDIPlus_PenCreate(Random(0xFF000000, 0xFFFFFFFF, 0))]], $iSleeping = 0
    For $i = 0 To UBound($aStart) - 1
    $aStart[$i][0] = Random(0, $iWidth2, 0)
    $aStart[$i][1] = Random(0, $iHeight2, 0)
    $aStart[$i][2] = $iExplosion
    $aStart[$i][3] = _GDIPlus_PenCreate(Random(0xFF000000, 0xFFFFFFFF, 0))
    Next

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

    While GUIGetMsg() <> -3
    _GDIPlus_GraphicsClear($hGfxBuffer, $iBack)
    If $iSleeping = 0 Then
    For $j = 0 To UBound($aStart) - 1
    For $i = 0 To 35
    $aDraw = Dreieck($i * 10, $aStart[$j][2] - $iExplosion)
    _GDIPlus_GraphicsDrawRect($hGfxBuffer, $aStart[$j][0] + Round($aDraw[0], 0), $aStart[$j][1] + Round($aDraw[1], 0), 2, 2, $aStart[$j][3])
    Next
    $aStart[$j][2] += $iExplosionGround + Ceiling(10 * $iExplosion / ($aStart[$j][2]))
    If $aStart[$j][2] > $iRadius Then
    $iSleeping = $iSleep
    $aStart[$j][0] = Random(0, $iWidth2, 0)
    $aStart[$j][1] = Random(0, $iHeight2, 0)
    $aStart[$j][2] = $iExplosion
    _GDIPlus_PenDispose($aStart[$j][3])
    $aStart[$j][3] = _GDIPlus_PenCreate(Random(0xFF000000, 0xFFFFFFFF, 0))
    EndIf
    Next
    Else
    $iSleeping -= 1
    EndIf
    _WinAPI_RedrawWindow($hGUI, 0, 0, 2)
    WEnd

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

    EndFunc

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

    Func Dreieck($iWinkel, $iLaenge)
    Local $iDeg = 0.0174532925199433, $aRet[2]
    $aRet[0] = Sin($iWinkel * $iDeg) * $iLaenge
    $aRet[1] = Cos($iWinkel * $iDeg) * $iLaenge
    Return $aRet
    EndFunc ;==>Dreieck

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

    Jetzt noch die INI Datei, die für das Script benötigt wird:
    bitte als "GDI+ Countdown-Screensaver.ini" abspeichern

    Spoiler anzeigen
    Code
    [Settings]
    bgcolor=0x90000000
    txtcolor=0xFF0000FF


    Bitte dringend um Hilfe ....

    Lg
    Ququknife

  • Hi,

    was heißt denn "funktioniert nicht"? Mit der Fehlerbeschreibung kann ich nicht allzuviel anfangen... was funktioniert nicht und was soll das Programm können?
    Auf Win7 tauchen bei mir undefinierbare rote Farbkleckse, die größer werden und schließlich den Bildschirm füllen, auf. Ist das gewünscht?

    Gruß stay

  • das kommt wohl davon, dass dir die entsprechende INI Datei Fehlt in der noch informationen gespeichert sind, die sich das script dann holt!! aber darum geht es nicht ich weis nicht was genau bei Win Vista nicht funktioniert man sieht da einach gar nichts ohne eine fehlermeldung, tut das script auf Vista gar nichts!!

    Hänge die INI datei noch an den ersten Post dran!!

  • mein Beitrag hilft jetzt nicht, dein Script auf Vista laufen zu bringen, ich gebe dir mal einen Hinweiß, bezüglich deinen Includes. von denen hast du nämlich ein paar doppelt drin, das muss nicht sein schaut unschön aus! Nochdazu kannst du dein ganzes Script ein bisschen schöner schreiben!

    Zitat

    das kommt wohl davon, dass dir die entsprechende INI Datei Fehlt in der noch informationen gespeichert sind, die sich das script dann holt!! aber darum geht es nicht ich weis nicht was genau bei Win Vista nicht funktioniert man sieht da einach gar nichts ohne eine fehlermeldung, tut das script auf Vista gar nichts!!

    Hänge die INI datei noch an den ersten Post dran!!

    Wenn du wirklich Hilfe erwartest, dann solltest du alles was zum Script gehört auf Anhieb Posten oder zur Verfügung stellen und nicht erst wenn jemand dich darauf aufmerksam macht! :thumbdown:

    Musste mal gesagt werden :thumbup:

    Was dein Vista Problem angeht, bin ich genauso Ratlos wie du, denn meine Scripte wurden bisher nur auf Win7 Rechnern ausgeführt, deshalb habe ich mit Vista keine Erfahrung!!

    Aber ich meinte in der Hilfe mal etwas über Win Vista gelesen zu haben, vielleicht schaust du dich da einmal um! ;)

    MfG, Facemix

    meine Spezialität: Windowstools für eine leichtere Arbeit am PC

    Nicht veröffentlicht


    nicht veröffentlichte Programme von mir

    - FTP Filereader
    - Youtube Kanal Player
    -GDI+ Countdown (bis zu einem Wunderbaren ereignis :) )

    MyPastebin

  • Wozu sollte das Script admin Rechte brauchen? Ich sehe jedenfalls nichts, das darauf hindeuten würde. Das einzige was auffällt ist, dass mit einer ini Datei im Scriptverzeichnis gearbeitet wird, was bei aktiver Benutzerkontensteuerung probleme machen kann, sofern sich das Script in einem Standardwindows Verzeichnis (z.B. C:\programme\...) befindet. Stattdessen sollte man ini Dateien in den dafür gedachten Ordnern des Benutzers speichern (%APPDATA%\deinprogramm\...).

    Du könntest ja mal testen ob das Problem auch unter Windows7 auftritt wenn die Benutzerkontensteuerung aktiv ist.


    Eine andere potentielle Fehlerquelle ist mir hier noch aufgefallen:

    [autoit]

    _GDIPlus_MatrixScale($hMatrix, $iWidth / DllStructGetData($tBounds, "Width"), $iHeight / DllStructGetData($tBounds, "Height"), True)

    [/autoit]

    Ein Blick in die Hilfe verrät, dass dllstructgetdata() eine 0 zurückgibt, wenn es einen Fehler gibt. Die Division durch 0 würde dein Script vermutlich sofort zum Absturz bringen.

  • Wozu sollte das Script admin Rechte brauchen? Ich sehe jedenfalls nichts, das darauf hindeuten würde.

    Gefunden hab ich beim Überfliegen auch nichts. Ich hielt es jedoch für günstig, auch diese Variante einmal zu versuchen. Bei Kompatibilitätsproblemen vor allem unter Vista hat das schon des Öfteren geholfen :whistling:

    [autoit]

    _Singleton(@AutoItExe)

    [/autoit]


    Ist auch illegal. Der erste Parameter darf keine "\" enthalten.

    Wäre mal ratsam, das Programm mit MsgBoxen o.ä. Zeile für Zeile zu "debuggen".
    Ab dem Moment, ab dem keine mehr auftaucht, weißt du, wo der Fehler liegt ;)

    Einmal editiert, zuletzt von stayawayknight (1. Dezember 2012 um 10:51)