GUICtrlCreatePic zeigt kein Bild mehr

  • Hi ich habe meinen Script ein bisschen grafisch verändert und schon zeigte GUICtrlCreatePic kein Bild mehr.
    Script: Was ist hier falsch???

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <SliderConstants.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <ProgressConstants.au3>
    #include <Misc.au3>
    #Include <GuiButton.au3>

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

    Opt("TrayMenuMode",3)
    Opt("TrayAutoPause",0)
    $InetCheck = Ping("74.125.39.99")
    If Not @error = 0 Then
    MsgBox(16,"ERROR","Failed to Connect Network!" & @CRLF & "Please restart this Program")
    Exit
    EndIf

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

    If _Singleton("BlackEyes StreamPlayer",1) = 0 Then
    Msgbox(16,"Warnung","Eine Instanz des Skripts wird bereits ausgeführt!")
    Exit
    EndIf

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

    Global $INIstyle = @ScriptDir & "\Konfig.ini"
    If @OSArch = "X64" Then
    Global $BlackEyes = @ScriptDir & "\BlackEyes StreamPlayerX64.exe"
    EndIf
    If @OSArch = "X86" Then
    Global $BlackEyes = @ScriptDir & "\BlackEyes StreamPlayer.exe"
    EndIf

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

    AdlibRegister("CheckMouse")

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

    $Pic1 = IniRead($INIstyle,"Style","Background","")
    $oWMP = ObjCreate("WMPLayer.ocx")
    $GUI = GUICreate("BlackEyes StreamPlayer", 575, 402, -1, -1)
    GUICtrlCreatePic($Pic1, 0, 0, 401, BitOR($WS_GROUP,$WS_CLIPSIBLINGS))
    $HauptMenu = GUICtrlCreateMenu("Datei")
    $KonifgDel = GUICtrlCreateMenuItem("Konfiguration löschen",$HauptMenu)
    $Update = GUICtrlCreateMenuItem("Update",$HauptMenu)
    $HMenuE = GUICtrlCreateMenuItem("Beenden",$HauptMenu)
    $SMenu = GUICtrlCreateMenu("Stream URLs")
    $SMenu1 = GUICtrlCreateMenuItem("TechnoBase.FM",$SMenu)
    $SMenu2 = GUICtrlCreateMenuItem("Top100Station",$SMenu)
    $SMenu3 = GUICtrlCreateMenuItem("Planet Radio",$SMenu)
    $SMenu4 = GUICtrlCreateMenuItem("YouFM",$SMenu)
    $SMenu5 = GUICtrlCreateMenuItem("HR3",$SMenu)
    $SMenu6 = GUICtrlCreateMenuItem("Rautemusik.fm Main",$SMenu)
    $SMenu7 = GUICtrlCreateMenuItem("1Live",$SMenu)
    $SMenu8 = GUICtrlCreateMenuItem("FFH",$SMenu)
    $SMenu9 = GUICtrlCreateMenuItem("104.6 RTL",$SMenu)
    $Smenu10 = GUICtrlCreateMenuItem("103.7 Unser Ding",$SMenu)
    $Smenu11 = GUICtrlCreateMenuItem("N-Joy",$SMenu)
    $StyleM = GUICtrlCreateMenu("Styles")
    $Style2 = GUICtrlCreateMenuItem("Standard",$StyleM)
    $StyleEE = GUICtrlCreateMenuItem("Planets in Night",$StyleM)
    $StyleEEE = GUICtrlCreateMenuItem("Stripes",$StyleM)
    $StyleE = GUICtrlCreateMenuItem("Eigenes Bild",$StyleM)
    $Menu = GUICtrlCreateMenu("Hilfe")
    $MenuE = GUICtrlCreateMenuItem("About",$Menu)
    $Combo1 = GUICtrlCreateCombo("Bitte auswählen", 160, 168, 217, 25)
    GUICtrlSetData(-1,"TechnoBase.FM|Top100Station|Planet Radio|YouFM|HR3|Rautemusik.fm Main|1Live|FFH|RTL 104.6|103.7 Unser Ding|N-Joy","Bitte auswählen")
    $Label1 = GUICtrlCreateLabel("", 184, 136,150,20)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xff0000)
    $Icon1 = GUICtrlCreateIcon(@ScriptDir & "\Icons.dll", 1, 112, 312, 64, 64, BitOR($SS_NOTIFY,$WS_GROUP))
    GUICtrlSetTip(-1,"Play")
    $Icon2 = GUICtrlCreateIcon(@ScriptDir & "\Icons.dll", 2, 370, 312, 64, 64, BitOR($SS_NOTIFY,$WS_GROUP))
    GUICtrlSetTip(-1,"Stop")
    $Progress1 = GUICtrlCreateProgress(24, 40, 41, 297,$PBS_VERTICAL)
    GUICtrlSetColor($Progress1,0xff0000)
    GUICtrlSetBkColor($Progress1,-2)
    $Volume = GUICtrlCreateSlider(536, 0, 33, 380, BitOR($TBS_AUTOTICKS,$TBS_VERT))
    GUICtrlSetTip(-1,"Volume")
    GUICtrlSetBkColor($Volume, -2)
    GUICtrlSetData(-1, $oWMP.settings.volume())
    GUISetState(@SW_SHOW)
    $SenderP = TrayCreateMenu("Sender abspielen")
    $TB = TrayCreateItem("TechnoBase.FM",$SenderP)
    $TB100 = TrayCreateItem("Top100Station",$SenderP)
    $PR = TrayCreateItem("Planet Radio",$SenderP)
    $YF = TrayCreateItem("YouFM",$SenderP)
    $H3 = TrayCreateItem("HR3",$SenderP)
    $RM = TrayCreateItem("Rautemusk.fm Main",$SenderP)
    $1L = TrayCreateItem("1Live",$SenderP)
    $FFH = TrayCreateItem("FFH",$SenderP)
    $RTL = TrayCreateItem("RTL 104.6",$SenderP)
    $UD = TrayCreateItem("103.7 Unser Ding",$SenderP)
    $NJ = TrayCreateItem("N-Joy",$SenderP)
    $TR = TrayCreateItem("Fenster anzeigen")
    $MTT = TrayCreateItem("Minimize to Tray")
    $LA = TrayCreateItem("Lauter")
    $LE = TrayCreateItem("Leiser")
    $ST = TrayCreateItem("Stop")
    $BE = TrayCreateItem("Beenden")
    $MT = TrayCreateItem("Ton aus")
    $Start = TimerInit()

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

    While 1
    If TimerDiff($Start) > 1000 Then
    GUICtrlSetData($Label1,"Es ist: " & @Hour & ":" & @MIN & ":" & @SEC)
    $Start = TimerInit()
    EndIf
    $oWMP.settings.volume = 100 - GUICtrlRead($Volume)
    $nMsg = GUIGetMsg()
    $msg = TrayGetMsg()
    Switch $msg
    Case $TR
    GUISetState(@SW_SHOW)
    Case $MTT
    GUISetState(@SW_HIDE)
    Case $MT
    If $oWMP.settings.mute = False Then
    $oWMP.settings.mute = True
    TrayItemDelete($MT)
    $MT = TrayCreateItem("Ton An")
    TraySetIcon(@ScriptDir & "\Icons.dll",7)
    Else
    $oWMP.settings.mute = False
    TrayItemDelete($MT)
    $MT = TrayCreateItem("Ton Aus")
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    EndIf
    Case $TB
    $oWMP.controls.play()
    $oWMP.URL = 'http://listen.technobase.fm/tunein-dsl-asx'
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    ToolTip("TechnoBase.FM",0,0)
    Case $TB100
    $oWMP.controls.play()
    $oWMP.URL = 'http://www.top100station.de/switch/r3472.asx'
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    ToolTip("Top100Station",0,0)
    Case $PR
    $oWMP.controls.play()
    $oWMP.URL = "http://lsd.newmedia.nacamar.net/bb/redirect.lsc?stream=planetradio$livestream.mp3&content=live&media=mp3"
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    ToolTip("Planet Radio",0,0)
    Case $YF
    $oWMP.controls.play()
    $oWMP.URL = "http://metafiles.gl-systemhaus.de/hr/youfm_1.asx"
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    ToolTip("YouFM",0,0)
    Case $H3
    $oWMP.controls.play()
    $oWMP.URL = "http://metafiles.gl-systemhaus.de/hr/hr3_2.m3u"
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    ToolTip("HR3",0,0)
    Case $RM
    $oWMP.controls.play()
    $oWMP.URL = "http://main-high.rautemusik.fm/listen.asx"
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    ToolTip("Rautemusik.fm Main",0,0)
    Case $1L
    $oWMP.controls.play()
    $oWMP.URL = "http://www.wdr.de/wdrlive/media/einslive.asx"
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    ToolTip("1Live",0,0)
    Case $FFH
    $oWMP.controls.play()
    $oWMP.URL = "http://tiscali.project-fx.de/play.wma?radio=ffh128"
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    ToolTip("FFH",0,0)
    Case $RTL
    $oWMP.controls.play()
    $oWMP.URL = "http://tiscali.project-fx.de/play.wma?radio=rtl1046"
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    ToolTip("RTL 104.6",0,0)
    Case $UD
    $oWMP.controls.play()
    $oWMP.URL = "http://streaming01.sr-online.de/unserding_2.m3u"
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    ToolTip("103.7 Unser Ding",0,0)
    Case $NJ
    $oWMP.controls.play()
    $oWMP.URL = "http://ndr-n-joy-hi-wma.wm.llnwd.net/ndr_n-joy_hi_wma"
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    ToolTip("N-Joy",0,0)
    Case $LA
    $ReadV = GUICtrlRead($Volume)
    GUICtrlSetData($Volume ,$ReadV-10)
    Case $LE
    $ReadV = GUICtrlRead($Volume)
    GUICtrlSetData($Volume ,$ReadV+10)
    Case $ST
    $oWMP.controls.stop()
    TraySetIcon(@ScriptDir & "\Icons.dll",5)
    ToolTip("Pausiert",0,0)
    Case $BE
    Exit
    EndSwitch
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $GUI_EVENT_MINIMIZE
    GUISetState(@SW_HIDE)
    Case $KonifgDel
    FileDelete(@ScriptDir & "\Konfig.ini")
    Run(@ComSpec&' /c ping 127.0.0.1 -n 2 & "'&@ScriptFullPath&'"', "", @SW_HIDE)
    Exit
    Case $Update
    Run(@ScriptDir & "\Updater.exe")
    Case $Style2
    FileDelete(@ScriptDir & "\Konfig.ini")
    Run(@ComSpec&' /c ping 127.0.0.1 -n 2 & "'&@ScriptFullPath&'"', "", @SW_HIDE)
    Exit
    Case $StyleE
    $open = FileOpenDialog("Bild",@DesktopDir,"Bilder (*.jpg;*.bmp;*.gif)",1+4)
    If $open = False Then
    MsgBox(0,"ERROR","Kein Bild ausgewählt!")
    Else
    IniDelete($INIstyle,"Style","")
    IniWrite($INIstyle,"Style","Background",$open)
    Run(@ComSpec&' /c ping 127.0.0.1 -n 2 & "'&@ScriptFullPath&'"', "", @SW_HIDE)
    Exit
    EndIf
    Case $StyleEE
    IniDelete($INIstyle,"Style","")
    IniWrite($INIstyle,"Style","Background",@ScriptDir & "\Backgrounds\Planets in Night.jpg")
    Run(@ComSpec&' /c ping 127.0.0.1 -n 2 & "'&@ScriptFullPath&'"', "", @SW_HIDE)
    Exit
    Case $StyleEEE
    IniDelete($INIstyle,"Style","")
    IniWrite($INIstyle,"Style","Background",@ScriptDir & "\Backgrounds\Stripes.jpg")
    Run(@ComSpec&' /c ping 127.0.0.1 -n 2 & "'&@ScriptFullPath&'"', "", @SW_HIDE)
    Exit
    Case $HMenuE
    Exit
    Case $SMenu1
    MsgBox(0,"TechnoBase.FM","http://listen.technobase.fm/tunein-dsl-asx")
    Case $SMenu2
    MsgBox(0,"Top100Station","http://www.top100station.de/switch/r3472.asx")
    Case $SMenu3
    MsgBox(0,"Planet Radio","http://lsd.newmedia.nacamar.net/bb/redirect.lsc?stream=planetradio$livestream.mp3&content=live&media=mp3")
    Case $SMenu4
    MsgBox(0,"YouFM","http://metafiles.gl-systemhaus.de/hr/youfm_1.asx")
    Case $SMenu5
    MsgBox(0,"HR3","http://metafiles.gl-systemhaus.de/hr/hr3_2.m3u")
    Case $SMenu6
    MsgBox(0,"Rautemusik.fm Main","http://main-high.rautemusik.fm/listen.asx")
    Case $SMenu7
    MsgBox(0,"1Live","http://www.wdr.de/wdrlive/media/einslive.asx")
    Case $SMenu8
    MsgBox(0,"FFH","http://tiscali.project-fx.de/play.wma?radio=ffh128")
    Case $SMenu9
    MsgBox(0,"RTL 104.6","http://tiscali.project-fx.de/play.wma?radio=rtl1046")
    Case $SMenu10
    MsgBox(0,"103.7 Unser Ding","http://streaming01.sr-online.de/unserding_2.m3u")
    Case $SMenu11
    MsgBox(0,"N-Joy","http://ndr-n-joy-hi-wma.wm.llnwd.net/ndr_n-joy_hi_wma")
    Case $MenuE
    MsgBox(0,"About BlackEyes StreamPlayer","BlackEyes StreamPlayer Version 2.6")
    Case $Icon1
    $readcombo1 = GUICtrlRead($Combo1)
    $oWMP.controls.play()
    Switch $Icon1
    Case $readcombo1 = "TechnoBase.FM"
    $oWMP.URL = 'http://listen.technobase.fm/tunein-dsl-asx'
    For $i = 1 To 100 Step 1
    GUICtrlSetData($Progress1, $i)
    Sleep(20)
    Next
    GUICtrlSetData($Progress1, 0)
    ToolTip("TechnoBase.FM",0,0)
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    Case $readcombo1 = "Top100Station"
    $oWMP.URL = 'http://www.top100station.de/switch/r3472.asx'
    For $i = 1 To 100 Step 1
    GUICtrlSetData($Progress1, $i)
    Sleep(20)
    Next
    GUICtrlSetData($Progress1, 0)
    ToolTip("Top100Station",0,0)
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    Case $readcombo1 = "Planet Radio"
    $oWMP.URL = 'http://lsd.newmedia.nacamar.net/bb/redirect.lsc?stream=planetradio$livestream.mp3&content=live&media=mp3'
    For $i = 1 To 100 Step 1
    GUICtrlSetData($Progress1, $i)
    Sleep(20)
    Next
    GUICtrlSetData($Progress1, 0)
    ToolTip("Planet Radio",0,0)
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    Case $readcombo1 = "YouFM"
    $oWMP.URL = 'http://metafiles.gl-systemhaus.de/hr/youfm_1.asx'
    For $i = 1 To 100 Step 1
    GUICtrlSetData($Progress1, $i)
    Sleep(20)
    Next
    GUICtrlSetData($Progress1, 0)
    ToolTip("YouFM",0,0)
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    Case $readcombo1 = "HR3"
    $oWMP.URL = 'http://metafiles.gl-systemhaus.de/hr/hr3_2.m3u'
    For $i = 1 To 100 Step 1
    GUICtrlSetData($Progress1, $i)
    Sleep(20)
    Next
    GUICtrlSetData($Progress1, 0)
    ToolTip("HR3",0,0)
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    Case $readcombo1 = "Rautemusik.fm Main"
    $oWMP.URL = 'http://main-high.rautemusik.fm/listen.asx'
    For $i = 1 To 100 Step 1
    GUICtrlSetData($Progress1, $i)
    Sleep(20)
    Next
    GUICtrlSetData($Progress1, 0)
    ToolTip("Rautemusik.fm Main",0,0)
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    Case $readcombo1 = "1Live"
    $oWMP.URL = 'http://www.wdr.de/wdrlive/media/einslive.asx'
    For $i = 1 To 100 Step 1
    GUICtrlSetData($Progress1, $i)
    Sleep(20)
    Next
    GUICtrlSetData($Progress1, 0)
    ToolTip("1Live",0,0)
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    Case $readcombo1 = "FFH"
    $oWMP.URL = 'http://tiscali.project-fx.de/play.wma?radio=ffh128'
    For $i = 1 To 100 Step 1
    GUICtrlSetData($Progress1, $i)
    Sleep(20)
    Next
    GUICtrlSetData($Progress1, 0)
    ToolTip("FFH",0,0)
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    Case $readcombo1 = "RTL 104.6"
    $oWMP.URL = 'http://tiscali.project-fx.de/play.wma?radio=rtl1046'
    For $i = 1 To 100 Step 1
    GUICtrlSetData($Progress1, $i)
    Sleep(20)
    Next
    GUICtrlSetData($Progress1, 0)
    ToolTip("RTL 104.6",0,0)
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    Case $readcombo1 = "103.7 Unser Ding"
    $oWMP.URL = 'http://streaming01.sr-online.de/unserding_2.m3u'
    For $i = 1 To 100 Step 1
    GUICtrlSetData($Progress1, $i)
    Sleep(20)
    Next
    GUICtrlSetData($Progress1, 0)
    ToolTip("103.7 Unser Ding",0,0)
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    Case $readcombo1 = "N-Joy"
    $oWMP.URL = 'http://ndr-n-joy-hi-wma.wm.llnwd.net/ndr_n-joy_hi_wma'
    For $i = 1 To 100 Step 1
    GUICtrlSetData($Progress1, $i)
    Sleep(20)
    Next
    GUICtrlSetData($Progress1, 0)
    ToolTip("N-Joy",0,0)
    TraySetIcon(@ScriptDir & "\Icons.dll",4)
    Case $readcombo1 = "Bitte auswählen"
    MsgBox(0,"ERROR","Kein Sender ausgewählt!")
    EndSwitch
    Case $Icon2
    $oWMP.controls.stop()
    GUICtrlSetState($Combo1, $GUI_ENABLE)
    GUICtrlSetData($Progress1, 0)
    ToolTip("Pausiert",0,0)
    EndSwitch
    WEnd

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

    Func CheckMouse()
    Local Static $mouseout=0
    $aMpos = MouseGetPos()
    $aWpos = WinGetPos("BlackEyes StreamPlayer")
    If $aMpos[0] > $aWpos[0] And $aMpos[0] < $aWpos[0] + $aWpos[2] And $aMpos[1] > $aWpos[1] And $aMpos[1] < $aWpos[1] + $aWpos[3] Then
    If $mouseout = 1 Then
    For $i=30 to 255 Step 30
    WinSetTrans("BlackEyes StreamPlayer", "", $i)
    sleep(30)
    Next
    WinSetTrans("BlackEyes StreamPlayer", "", 255)
    $mouseout=0
    EndIf
    Else
    If $mouseout=0 Then
    For $i=255 to 30 Step -30
    WinSetTrans("BlackEyes StreamPlayer", "", $i)
    Sleep(30)
    Next
    $mouseout=1
    EndIf
    EndIf
    EndFunc

    [/autoit]


    Die .ini existiert und selbst wenn sie nicht existieren würde dann würde sie beim eigenen bild geschrieben werden.
    Die ordner stimmen auch.

    Einmal editiert, zuletzt von Molaynox (16. Oktober 2010 um 19:06)