E-Mail und GUI Problem in zusammenhang

  • Hi ich wollte mal aus fun meinem programm einen seriennummerncheck verpassen. (auch um zu lernen :D )
    Aber leider gibt es ein paar Probleme. Nämlich:
    1. Es wird keine E-Mail versandt
    2. Die GUI wird einfach komplett blank ohne Controls angezeigt

    Script
    [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>
    #Include <file.au3>

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

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

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

    Global $SmtpServer , $FromName , $FromAddress , $ToAddress , $Subject , $ssl , $oMyRet , $HexNumber , $oMyError
    Global $Registrate = @TempDir & "\BlackEyesSoft\Registrate.ini"

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

    If Not FileExists(@TempDir & "\BlackEyesSoft\Registrate.ini") Then DirCreate(@TempDir & "\BlackEyesSoft\")

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

    If IniRead($Registrate,"Register","YESorNO","Unregistered") = "Unregistered" Then
    MsgBox(48,"Warnung","Ihre Version ist nicht registriert, Sie können dieses Programm erst nach der kostenlosen Registration nutzen.")
    If IniRead($Registrate,"EMAIL","YESorNO","NO") = "NO" Then
    $Uemail = InputBox("Ihre E-Mail Adresse","Geben sie ihre E-mail Adresse an um die Seriennummer zu erhalten. Ihre E-mail Adresse wird nicht an Dritte weitergegeben" & _
    ", Oder für Werbung genutzt. Sie dient lediglich der Aufstellung einer Nutzungsstatistik dieses Programmes. Die Registration kann leider im Extremfall bis 1 1/2 " & _
    "Wochen dauern. Wir bitten um Ihr Verständnis","","",400,200)
    $UemailW = InputBox("Ihre E-Mail Adresse wiederholen","Bitte wiederholen sie ihre E-mail adresse. Dies dient der Beseitigung unnötiger Tippfehler","")
    If Not $Uemail = $UemailW Then
    MsgBox(16,"ERROR","E-Mail Adressen stimmen nicht überein")
    Exit
    EndIf
    If $Uemail = "" Or False Then
    MsgBox(16,"ERROR","Keine Gültige E-mail Adresse eingegeben bitte Vorgang wiederholen")
    Exit
    EndIf
    IniDelete($Registrate,"EMAIL","EMAIL")
    IniWrite($Registrate,"EMAIL","EMAIL",$Uemail)
    IniDelete($Registrate,"EMAIL","YESorNO")
    IniWrite($Registrate,"EMAIL","YESorNO","YES")
    _Senden ()
    Else
    $Em = IniRead($Registrate,"EMAIL","EMAIL","username@hoster.de")
    $ask3 = MsgBox(36,"EMAIL","Ist dies ihre richtige E-Mail Adresse: " & $Em)
    If $ask3 = 7 Then
    $Uemail = InputBox("Ihre E-Mail Adresse","Geben sie ihre E-mail Adresse an um die Seriennummer zu erhalten. Ihre E-mail Adresse wird nicht an Dritte weitergegeben" & _
    ", Oder für Werbung genutzt. Sie dient lediglich der Aufstellung einer Nutzungsstatistik dieses Programmes. Die Registration kann leider im Extremfall bis 1 1/2 " & _
    "Wochen dauern. Wir bitten um Ihr Verständnis","","",400,200)
    $UemailW = InputBox("Ihre E-Mail Adresse wiederholen","Bitte wiederholen sie ihre E-mail adresse. Dies dient der Beseitigung unnötiger Tippfehler","")
    If Not $Uemail = $UemailW Then
    MsgBox(16,"ERROR","E-Mail Adressen stimmen nicht überein")
    Exit
    EndIf
    If $Uemail = "" Or False Then
    MsgBox(16,"ERROR","Keine Gültige E-mail Adresse eingegeben bitte Vorgang wiederholen")
    Exit
    EndIf
    IniDelete($Registrate,"EMAIL","EMAIL")
    IniWrite($Registrate,"EMAIL","EMAIL",$Uemail)
    IniDelete($Registrate,"EMAIL","YESorNO")
    IniWrite($Registrate,"EMAIL","YESorNO","YES")
    _Senden ()
    EndIf
    EndIf
    $ask = MsgBox(36,"Seriennummer","Möchten sie Jetzt die Seriennummer eingeben?")
    If $ask = 7 Then
    $ask2 = MsgBox(36,"FreeVersion","Möchten sie Bis sie ihre Seriennummer erhalten haben die FreeVersion mit einigen Einschränkungen nutzen?")
    If $ask2 = 7 Then Exit
    If $ask2 = 6 Then
    Global $Free = "YES"
    EndIf
    EndIf
    If $ask = 6 Then
    $serial = InputBox("Seriennummer eingeben","Bitte geben sie die Seriennummer ein die sie in der E-mail erhalten haben.","")
    $ser = StringRegExp($serial,"([A-T0-5] {4} (-|$)) {4}",0)
    If $ser = 0 Then
    MsgBox(64,"ERROR","Seriennummer ist ungültig")
    Exit
    Else
    MsgBox(64,"Vielen Dank.","Vielen Dank das sie sich für BlackEyes StreamPlayer entschieden haben. Sie können nun alle Funktionien dieses Programms nutzen.")
    IniWrite($Registrate,"Register","YESorNO","User ist registriert")
    EndIf
    EndIf
    EndIf

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

    Global $Konfig = @ScriptDir & "\Konfig.ini"

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

    If IniRead($Konfig,"Message","ENABLEORDISABLE","ENABLE") = "ENABLE" Then
    $Text = "BlackEyes StreamPlayer! Willkommen!"
    $Form1 = GUICreate("Welcome!", 400, 200)
    $Label1 = GUICtrlCreateLabel($Text, 50, 50, 350, 150)
    GUICtrlSetFont(-1, 14, 800, 0, "Arial")
    GUICtrlSetColor(-1, 0x008000)
    GUICtrlSetData(-1, "")
    GUISetState(@SW_SHOW)
    _Label($Label1, $Text, 12)
    EndIf

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

    Opt("TrayMenuMode",3)
    Opt("TrayAutoPause",0)

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

    If IniRead($Konfig,"Transparenz","ENABLEORDISABLE","ENABLE") = "ENABLE" Then AdlibRegister("CheckMouse")

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

    $Pic1 = IniRead($INIstyle,"Style","Background","")
    $oWMP = ObjCreate("WMPLayer.ocx")
    $GUI = GUICreate("BlackEyes StreamPlayer", 602, 422, -1, -1)
    GUISetBkColor($GUI, -2)
    GUISetState(@SW_SHOW)
    GUICtrlCreatePic($Pic1, 0, 0, 533,401 ,BitOR($WS_GROUP,$WS_CLIPSIBLINGS))
    $HauptMenu = GUICtrlCreateMenu("Datei")
    $KonifgDel = GUICtrlCreateMenuItem("Konfiguration löschen",$HauptMenu)
    $Update = GUICtrlCreateMenuItem("Update",$HauptMenu)
    $HMenuE = GUICtrlCreateMenuItem("Beenden",$HauptMenu)
    $Konf = GUICtrlCreateMenuItem("Einstellungen",$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)
    If $Free = "YES" Then
    GUICtrlSetData($Combo1,"TechnoBase.FM||HR3|Rautemusik.fm Main|N-Joy","Bitte auswählen")
    Else
    GUICtrlSetData($Combo1,"TechnoBase.FM|Top100Station|Planet Radio|YouFM|HR3|Rautemusik.fm Main|1Live|FFH|RTL 104.6|103.7 Unser Ding|N-Joy","Bitte auswählen")
    EndIf
    $Label1 = GUICtrlCreateLabel("", 184, 136,150,20)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xff0000)
    $Info = GUIctrlCreateLabel("Info...",184,200,150,20)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xff0000)
    $Icon1 = GUICtrlCreateIcon(@ScriptDir & "\Icons.dll", 1, 536, 336, 64, 64, BitOR($SS_NOTIFY,$WS_GROUP))
    GUICtrlSetTip(-1,"Play")
    $Icon2 = GUICtrlCreateIcon(@ScriptDir & "\Icons.dll", 2, 536, 272, 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(560, 0, 41, 273, BitOR($TBS_AUTOTICKS,$TBS_VERT))
    GUICtrlSetTip(-1,"Volume")
    GUICtrlSetBkColor($Volume, -2)
    GUICtrlSetData(-1, $oWMP.settings.volume())
    $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()
    GUISetState(@SW_SHOW,$GUI)

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

    Dim $arrStatus[12]
    $arrStatus[0] = 'Unbekannt'
    $arrStatus[1] = 'Gestoppt'
    $arrStatus[2] = 'Pause'
    $arrStatus[3] = 'Playing'
    $arrStatus[4] = 'ScanForward'
    $arrStatus[5] = 'ScanReverse'
    $arrStatus[6] = 'Buffering'
    $arrStatus[7] = 'Warten'
    $arrStatus[8] = 'MediaEnded'
    $arrStatus[9] = 'Transitioning'
    $arrStatus[10] = 'Bereit'
    $arrStatus[11] = 'Wiederverbinden...'

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

    $lastStatus = 0

    [/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 $Konf
    Run(@ScriptDir & "\Konfig.exe")
    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.7")
    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
    $curStatus = $oWMP.playstate
    If $curStatus <> $lastStatus Then
    GUICtrlSetData($Info, $arrStatus[$curStatus])
    $lastStatus = $curStatus
    EndIf
    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
    If IniRead($Konfig,"WaitTime","ENABLEORDISABLE","DISABLE") = "ENABLE" Then
    $Time = IniRead($Konfig,"WaitTime","TIME","0")
    Sleep($Time)
    EndIf
    For $i=255 to 30 Step -30
    WinSetTrans("BlackEyes StreamPlayer", "", $i)
    Sleep(30)
    Next
    $mouseout=1
    EndIf
    EndIf
    EndFunc

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

    Func _Label($Label, $Text, $delay = 50)
    $ro = ""
    $bj = ""
    $j = 0
    $End = ""
    $ABC = " ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ßÄÖÜ.:,;/\()?{}! "
    $te = StringSplit($Text, "", 2 + 1)
    $b = StringSplit($ABC, "", 2 + 1)
    For $i = 0 To UBound($te) - 1
    ;
    Do
    Sleep($delay)
    $j += 1
    If $j = UBound($b) - 1 Then
    $bj &= "?"
    ExitLoop
    EndIf

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

    Sleep($delay)
    GUICtrlSetData($Label, $bj & $b[$j])
    Until $b[$j] = $te[$i]
    ;
    $bj &= $b[$j]
    Sleep($delay)
    $j = 0
    Next
    Sleep(2000)
    GUIDelete($Form1)
    EndFunc

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

    Func _Senden ()
    ProgressOn("BlackEyes StreamPlayer","Registration wird versendet! Bitte warten!","Einstellungen auslesen.",-1,-1,2)
    $emm = IniRead($Registrate , "EMAIL","EMAIL","Keine Angabe")
    $tt = "UserName: " & @UserName & @CRLF & "IP adress 1: " & @IPAddress1 & @CRLF & "IP adress 2: " & @IPAddress2 & @CRLF & "E-Mail adress: " & $emm & @CRLF & "OS: " & @OSVersion

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

    $SmtpServer = "mail.gmx.net" ; address for the smtp-server to use - REQUIRED
    $FromName = "BlackEyes StreamPlayer" ; name from who the email was sent
    $FromAddress = "black.eyes.soft@gmx.de" ; address from where the mail should come
    $ToAddress = "black.eyes.soft@gmx.de" ; destination address of the email - REQUIRED
    $Subject = "BlackEyes StreamPlayer Registration" ; subject from the email - can be anything you want it to be
    $Body = $tt ; the messagebody from the mail - can be left blank but then you get a blank mail
    $AttachFiles = "" ; the file you want to attach- leave blank if not needed
    $CcAddress = "" ; address for cc - leave blank if not needed
    $BccAddress = "" ; address for bcc - leave blank if not needed
    $Importance = "Normal" ; Send message priority: "High", "Normal", "Low"
    $Username = "black.eyes.soft@hotmail.de" ; username for the account used from where the mail gets sent - REQUIRED
    $Password = "********" ; password for the account used from where the mail gets sent - REQUIRED
    $IPPort = 25 ; port used for sending the mail
    $ssl = 0 ; enables/disables secure socket layer sending - put to 1 if using httpS
    ProgressSet(50 , "Registration wird versendet!")
    $rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl)
    If @error Then
    MsgBox(0, "Error sending message", "Error code:" & @error & " Description:" & $rc)
    FileDelete($Registrate)
    Else
    MsgBox(64,"Erfolgreich","Ihre E-mail Adresse wurde erfolgreich übermittelt")
    Exit
    EndIf
    ProgressOff()
    EndFunc

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

    Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance="Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0)
    Local $objEmail = ObjCreate("CDO.Message")
    $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>'
    $objEmail.To = $s_ToAddress
    Local $i_Error = 0
    Local $i_Error_desciption = ""
    If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress
    If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress
    $objEmail.Subject = $s_Subject
    If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then
    $objEmail.HTMLBody = $as_Body
    Else
    $objEmail.Textbody = $as_Body & @CRLF
    EndIf
    If $s_AttachFiles <> "" Then
    Local $S_Files2Attach = StringSplit($s_AttachFiles, ";")
    For $x = 1 To $S_Files2Attach[0]
    $S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x])
    ConsoleWrite('@@ Debug(62) : $S_Files2Attach = ' & $S_Files2Attach & @LF & '>Error code: ' & @error & @LF) ;### Debug Console
    If FileExists($S_Files2Attach[$x]) Then
    $objEmail.AddAttachment ($S_Files2Attach[$x])
    Else
    ConsoleWrite('!> File not found to attach: ' & $S_Files2Attach[$x] & @LF)
    SetError(1)
    Return 0
    EndIf
    Next
    EndIf
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer
    If Number($IPPort) = 0 then $IPPort = 25
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort
    If $s_Username <> "" Then
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password
    EndIf
    If $ssl Then
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
    EndIf
    $objEmail.Configuration.Fields.Update
    Switch $s_Importance
    Case "High"
    $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "High"
    Case "Normal"
    $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Normal"
    Case "Low"
    $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Low"
    EndSwitch
    $objEmail.Fields.Update
    $objEmail.Send
    If @error Then
    SetError(2)
    Return $oMyRet[1]
    EndIf
    $objEmail=""
    EndFunc

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

    Func MyErrFunc()
    $HexNumber = Hex($oMyError.number, 8)
    $oMyRet[0] = $HexNumber
    $oMyRet[1] = StringStripWS($oMyError.description, 3)
    ConsoleWrite("### COM Error ! Number: " & $HexNumber & " ScriptLine: " & $oMyError.scriptline & " Description:" & $oMyRet[1] & @LF)
    SetError(1); something to check for when this function returns
    Return
    EndFunc ;==>MyErrFunc

    [/autoit]

    Fehlercode bei Email Senden:
    C:\Users\Tobias\Documents\BlackEyes StreamPlayer FinalVersion.au3 (628) : ==> The requested action with this object has failed.:
    $objEmail.Send
    $objEmail.Send^ ERROR

    Ansonsten keine weiteren Fehlercodes.

    Einmal editiert, zuletzt von Molaynox (23. Oktober 2010 um 15:17)

  • Du versuchst mit einem Hotmailaccount etwas über gmx zu verschicken. Das kann natürlich nicht gehen:

    [autoit]

    $SmtpServer = "mail.gmx.net"
    $Username = "black.eyes.soft@hotmail.de"

    [/autoit]

    Andy hat mir ein Schnitzel gebacken aber da war ein Raupi drauf und bevor Oscar das Bugfixen konnte kam Alina und gab mir ein AspirinJunkie.

  • Du hast bei

    [autoit]

    GUISetBkColor()

    [/autoit]

    die Parameter vertauscht!

    So muss es aussehen

    [autoit]

    GUISetBkColor(-2, $GUI)

    [/autoit]