1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. DFPWare

Beiträge von DFPWare

  • VideoFortschrittsbalken

    • DFPWare
    • 22. Mai 2011 um 11:50

    Hey Leute

    ich programmier grade einen Videoplayer und habe jetzt ein Problem:

    wenn ich ein Video gestartet habe, dann kommt ein Slider als Fortschrittsbalken und dieser wird immer auf die aktuelle position im Video gesetzt, wenn ich aber jetzt auf eine Stelle auf den Slider klicke, dann wird das Video zwar auf die gewünschte Position gesetzt, aber es hackelt ein bisschen, das müsst ihr am besten sehen ;)

    Spoiler anzeigen
    [autoit]

    #AutoIt3Wrapper_UseX64=n
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <File.au3>
    #include <GuiListView.au3>
    #include <WMP.au3>
    OnAutoItExitRegister("_EXIT")
    Global $wmp
    Global $slider
    Global $videogui
    Global $videopfad = @UserProfileDir&"\Videos\"
    Global $videos = _FileListToArrayEx($videopfad,"*.avi;*.wmv",1)
    Global $Videosize = UBound($videos)
    Dim $groessevideos[$Videosize]
    Dim $Videolistitem[$Videosize]
    $DLL=DllOpen("MediaInfo.dll")
    $Handle=DllCall($DLL, "ptr", "MediaInfo_New")
    If IsArray($videos) = 0 Then
    MsgBox(0,"ERROR","In dem ausgewählten Verzeichnis befinden sich keine Video Dateien")
    $pfad = FileSelectFolder("Video Dateien angeben","C:")
    $videos = _FileListToArrayEx($videopfad,"*.avi;*.wmv",1)
    EndIf
    $Taschenrechner = GUICreate("Media Player",500,530,-1,-1,$WS_POPUP)
    GUISetBkColor(0x000000)
    $verschiebungscontrol=GUICtrlCreateLabel("",220,0,220,40,"",$GUI_WS_EX_PARENTDRAG)
    $bClose = GUICtrlCreateButton("X",470,10,20,20)
    $bMinimize = GUICtrlCreateButton("_",440,10,20,20)
    $bMusic = GUICtrlCreateButton("Musicplayer",10,10,100,20)
    $bRadio = GUICtrlCreateButton("Radio",120,10,100,20)
    $bPfad = GUICtrlCreateButton("Video Ordner Auswählen",10,40,480,40)
    $VideoList = GUICtrlCreateListView("VideoName |Größe",10,90,480,430)
    GUISetState()
    _getgroesse()
    _listefuellen()
    While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $bClose
    Exit
    Case $bMinimize
    GUISetState(@SW_MINIMIZE)
    Case $bPfad
    _videopfadaendern()
    EndSwitch
    For $j=1 To $Videosize-1
    Switch $msg
    Case $Videolistitem[$j]
    _Filmspielen($j)
    EndSwitch
    Next
    WEnd

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

    Func _Filmspielen($Nummer)
    $Open_Result=DllCall($DLL, "int", "MediaInfo_Open", "ptr", $Handle[0], "wstr", $videopfad&$videos[$Nummer])
    DllCall($DLL, "wstr", "MediaInfo_Option", "ptr", 0, "wstr", "Inform", "wstr", "Video;%Width%")
    $Inform=DllCall($DLL, "wstr", "MediaInfo_Inform", "ptr", $Handle[0], "int", 0)
    $breite = $Inform[0]
    DllCall($DLL, "wstr", "MediaInfo_Option", "ptr", 0, "wstr", "Inform", "wstr", "Video;%Height%")
    $Inform=DllCall($DLL, "wstr", "MediaInfo_Inform", "ptr", $Handle[0], "int", 0)
    $hoehe= $Inform[0]
    GUISetState(@SW_HIDE,$Taschenrechner)
    $videogui = GUICreate($videos[$Nummer],$breite,$hoehe+100)
    Opt("GUIOnEventMode", 1)
    GUISetOnEvent($GUI_EVENT_CLOSE, "quit")
    $wmp = _wmpcreate(1, 0, 0, $breite, $hoehe)
    _wmploadmedia($wmp,$videopfad&$videos[$Nummer])
    $slider = GUICtrlCreateSlider(10,$hoehe+10,$breite-20,20)
    GUICtrlSetOnEvent($slider,"setzePosition")
    While _wmpvalue($wmp,"getduration") = 0
    Sleep(1)
    WEnd
    GUICtrlSetLimit($slider,_wmpvalue($wmp,"getduration"),0)
    GUISetState(@SW_SHOW,$videogui)
    AdlibRegister("setzeBalken",100)
    _wmpvalue( $wmp, "controls" )
    EndFunc
    Func setzeBalken()
    GUICtrlSetData( $slider, _wmpvalue($wmp,"getposition"))
    EndFunc
    Func setzePosition()
    _wmpvalue($wmp,"setposition",GUICtrlRead($slider))
    EndFunc
    Func quit()
    AdlibUnRegister("setzeBalken")
    GUIDelete($videogui)
    GUISetState(@SW_SHOW,$Taschenrechner)
    Opt("GUIOnEventMode", 0)
    EndFunc
    Func _listefuellen()
    For $i=1 To $Videosize-1
    $Videolistitem[$i] = GUICtrlCreateListViewItem($videos[$i]&"|"&$groessevideos[$i],$VideoList)
    Next
    EndFunc
    Func _getgroesse()
    For $i=1 To $Videosize-1
    $groessevideos[$i] = FileGetSize($videopfad&$videos[$i])/1000000
    $groessevideos[$i] = Round($groessevideos[$i],2)
    $groessevideos[$i] = $groessevideos[$i]&"MB"
    Next
    EndFunc
    Func _videopfadaendern()
    _GUICtrlListView_DeleteAllItems($VideoList)
    $pfadzwischen = FileSelectFolder("Musikordner auswählen","")
    $pfad = $pfadzwischen&"\"
    $videos = _FileListToArrayEx($videopfad,"*.avi;*.wmv",1)
    $Videosize = UBound($videos)
    _listefuellen()
    EndFunc
    Func _EXIT()
    $Handle=DllCall($DLL, "none", "MediaInfo_Delete", "ptr", $Handle[0])
    DllClose($dll)
    EndFunc

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

    Func _FileListToArrayEx($sPath, $sFilter = '*.*', $iFlag = 0, $sExclude = '')
    If Not FileExists($sPath) Then Return SetError(1, 1, '')
    If $sFilter = -1 Or $sFilter = Default Then $sFilter = '*.*'
    If $iFlag = -1 Or $iFlag = Default Then $iFlag = 0
    If $sExclude = -1 Or $sExclude = Default Then $sExclude = ''
    Local $aBadChar[6] = ['\', '/', ':', '>', '<', '|']
    For $iCC = 0 To 5
    If StringInStr($sFilter, $aBadChar[$iCC]) Or _
    StringInStr($sExclude, $aBadChar[$iCC]) Then Return SetError(2, 2, '')
    Next
    If StringStripWS($sFilter, 8) = '' Then Return SetError(2, 2, '')
    If Not ($iFlag = 0 Or $iFlag = 1 Or $iFlag = 2) Then Return SetError(3, 3, '')
    Local $oFSO = ObjCreate("Scripting.FileSystemObject"), $sTFolder
    $sTFolder = $oFSO.GetSpecialFolder(2)
    Local $hOutFile = @TempDir & $oFSO.GetTempName
    If Not StringInStr($sFilter, ';') Then $sFilter &= ';'
    Local $aSplit = StringSplit(StringStripWS($sFilter, 8), ';'), $sRead
    For $iCC = 1 To $aSplit[0]
    If StringStripWS($aSplit[$iCC], 8) = '' Then ContinueLoop
    If StringLeft($aSplit[$iCC], 1) = '.' And _
    UBound(StringSplit($aSplit[$iCC], '.')) - 2 = 1 Then $aSplit[$iCC] = '*' & $aSplit[$iCC]
    RunWait(@ComSpec & ' /c ' & 'dir "' & $sPath & '\' & $aSplit[$iCC] _
    & '" /b /o-e /od > "' & $hOutFile & '"', '', @SW_HIDE)
    $sRead &= FileRead($hOutFile)
    If Not FileExists($hOutFile) Then Return SetError(4, 4, '')
    FileDelete($hOutFile)
    Next
    If StringStripWS($sRead, 8) = '' Then SetError(4, 4, '')
    Local $aFSplit = StringSplit(StringTrimRight(StringStripCR($sRead), 1), @LF)
    Local $sHold
    For $iCC = 1 To $aFSplit[0]
    If $sExclude And StringLeft($aFSplit[$iCC], _
    StringLen(StringReplace($sExclude, '*', ''))) = StringReplace($sExclude, '*', '') Then ContinueLoop
    Switch $iFlag
    Case 0
    $sHold &= $aFSplit[$iCC] & Chr(1)
    Case 1
    If StringInStr(FileGetAttrib($sPath & '\' & $aFSplit[$iCC]), 'd') Then ContinueLoop
    $sHold &= $aFSplit[$iCC] & Chr(1)
    Case 2
    If Not StringInStr(FileGetAttrib($sPath & '\' & $aFSplit[$iCC]), 'd') Then ContinueLoop
    $sHold &= $aFSplit[$iCC] & Chr(1)
    EndSwitch
    Next
    If StringTrimRight($sHold, 1) Then Return StringSplit(StringTrimRight($sHold, 1), Chr(1))
    Return SetError(4, 4, '')
    EndFunc

    [/autoit]

    Ich wollte fragen wie ich das verbessern kann.

    ggf müsst ihr den Pfad in z.13 anpassen ;)

    Danke

    DFPWare

  • Auflösung von *.wmv, *.avi,... ermitteln

    • DFPWare
    • 21. Mai 2011 um 20:36

    Dankee ;)

  • Auflösung von *.wmv, *.avi,... ermitteln

    • DFPWare
    • 21. Mai 2011 um 19:54

    aaalso, ne andere Datei hab ich probiert, im scriptdir hab ich die MediaInfo.dll und sonst nix, keine Leer/Sonderzeichen, moment........ mist :pinch: falscher Pfad jaja nenn mich idiot :rolleyes: tut mir leid...

    Danke ;)

    Edit: achso ja wie kann ich das denn jetzt hinbekommen dass das auch auf 32Bit OS's funktioniert?

    Oder muss ich dann einfach nen neues Programm schreiben, bzw die paar zeilen ändern

    DFPWare

  • Auflösung von *.wmv, *.avi,... ermitteln

    • DFPWare
    • 21. Mai 2011 um 19:31

    also ich benutze glaub ich die 32Bit dll und jetzt hab ich auch das n dur ein y ersetzt, jedoch kommt jetzt nur ne leere messagebox, egal ob ich die [0] weglasse oder nicht

    DFPWare

    Edit: Ja ich hatte die 32Bit dll, aber mit der 64er klappts auch nicht

    Noch ein Edit: Das Beispielskript was dabei war klappt übrigens auch nicht, es kommen nur einige leere MsgBoxen

  • Auflösung von *.wmv, *.avi,... ermitteln

    • DFPWare
    • 21. Mai 2011 um 17:33

    ich denke das würde mir schon weiterhelfen, bei mir kommt aber dass $Handle kein Array ist und $Inform genausowenig, wenn ich das aber als normale Variable einsetze dann kommt width 0 und height 0 -.-

    DFPWare

  • Auflösung von *.wmv, *.avi,... ermitteln

    • DFPWare
    • 21. Mai 2011 um 16:01

    dann kommt Subscript with non array variable X(

  • Music player/Radio verbessern

    • DFPWare
    • 21. Mai 2011 um 13:49

    zu 1.) ja ich weiß, das liegt daran, dass du im @UserProfileDir&"\Music\" ordner keine Musik hast.....glaub ich ;)

    zu 2.) werd ich machen ;)

  • Auflösung von *.wmv, *.avi,... ermitteln

    • DFPWare
    • 21. Mai 2011 um 13:23

    oh dann hab ich wohl das falsche gedownloaded ;)

    Danke

    Edit: da blick ich ja sowas von nicht durch ;)

    Ich versteh nix nich viel von dlls, ist das so richtig?

    [autoit]

    DllCall("MediaInfo.dll","int","MediaInfo_Open","str","C:\Users\Florian\Videos\Jackass2.avi")
    DllCall("MediaInfo.dll","wstr","MediaInfo_Inform","int",0)
    $iWidth = DllCall("MediaInfo.dll","wstr","MediaInfo_Get","str","video","str","first","int","width")
    MsgBox(0,"",$iWidth)

    [/autoit]
  • Auflösung von *.wmv, *.avi,... ermitteln

    • DFPWare
    • 21. Mai 2011 um 13:15

    hab mir jetzt mediainfo geholt, aber was soll ich jetzt damit anfangen?

    wo kann ich sehen welche funktionen in den dll's drinne sind und von welchem autoit beispiel redest du?:D

    DFPWare

  • Auflösung von *.wmv, *.avi,... ermitteln

    • DFPWare
    • 21. Mai 2011 um 13:09

    könnt ihr mir mal verraten warum das bei euch funktioniert?

    bei diesem script:

    Spoiler anzeigen
    [autoit]

    #include <Array.au3>
    $iWidth = _GetExtProperty("C:\Users\Florian\Videos\Jackass2.avi", -1)
    _ArrayDisplay($iWidth)
    ;===============================================================================
    ; Function Name: GetExtProperty($sPath,$iProp)
    ; Description: Returns an extended property of a given file.
    ; Parameter(s): $sPath - The path to the file you are attempting to retrieve an extended property from.
    ; $iProp - The numerical value for the property you want returned. If $iProp is is set
    ; to -1 then all properties will be returned in a 1 dimensional array in their corresponding order.
    ; The properties are as follows:
    ; Name = 0
    ; Size = 1
    ; Type = 2
    ; DateModified = 3
    ; DateCreated = 4
    ; DateAccessed = 5
    ; Attributes = 6
    ; Status = 7
    ; Owner = 8
    ; Author = 9
    ; Title = 10
    ; Subject = 11
    ; Category = 12
    ; Pages = 13
    ; Comments = 14
    ; Copyright = 15
    ; Artist = 16
    ; AlbumTitle = 17
    ; Year = 18
    ; TrackNumber = 19
    ; Genre = 20
    ; Duration = 21
    ; BitRate = 22
    ; Protected = 23
    ; CameraModel = 24
    ; DatePictureTaken = 25
    ; Dimensions = 26
    ; Width = 27
    ; Height = 28
    ; Company = 30
    ; Description = 31
    ; FileVersion = 32
    ; ProductName = 33
    ; ProductVersion = 34
    ; Requirement(s): File specified in $spath must exist.
    ; Return Value(s): On Success - The extended file property, or if $iProp = -1 then an array with all properties
    ; On Failure - 0, @Error - 1 (If file does not exist)
    ; Author(s): Simucal ([email='Simucal@gmail.com'][/email])
    ; Note(s):
    ;
    ;===============================================================================
    Func _GetExtProperty($sPath, $iProp)
    Local $iExist, $sFile, $sDir, $oShellApp, $oDir, $oFile, $aProperty, $sProperty
    $iExist = FileExists($sPath)
    If $iExist = 0 Then
    SetError(1)
    Return 0
    Else
    $sFile = StringTrimLeft($sPath, StringInStr($sPath, "\", 0, -1))
    $sDir = StringTrimRight($sPath, (StringLen($sPath) - StringInStr($sPath, "\", 0, -1)))
    $oShellApp = ObjCreate ("shell.application")
    $oDir = $oShellApp.NameSpace ($sDir)
    $oFile = $oDir.Parsename ($sFile)
    If $iProp = -1 Then
    Local $aProperty[35]
    For $i = 0 To 34
    $aProperty[$i] = $oDir.GetDetailsOf ($oFile, $i)
    Next
    Return $aProperty
    Else
    $sProperty = $oDir.GetDetailsOf ($oFile, $iProp)
    If $sProperty = "" Then
    Return 0
    Else
    Return $sProperty
    EndIf
    EndIf
    EndIf
    EndFunc ;==>_GetExtProperty

    [/autoit]

    bekomme ich dieses:

    Spoiler anzeigen

    [0]|Jackass2
    [1]|797 MB
    [2]|Videoclip
    [3]|01.01.2010 15:03
    [4]|28.04.2011 17:44
    [5]|21.05.2011 13:07
    [6]|A
    [7]|
    [8]|
    [9]|Video
    [10]|FLORIAN\Florian
    [11]|Video
    [12]|
    [13]|
    [14]|
    [15]|
    [16]|
    [17]|
    [18]|
    [19]|Nicht bewertet
    [20]|
    [21]|
    [22]|
    [23]|
    [24]|
    [25]|
    [26]|
    [27]|01:33:13
    [28]|‎448 kBit/s
    [29]|Nein
    [30]|
    [31]|
    [32]|
    [33]|
    [34]|

    name22 bei deiner Version bekomme ich {5634504D-0000-0010-8000-00AA00389B71} : 0

  • Auflösung von *.wmv, *.avi,... ermitteln

    • DFPWare
    • 21. Mai 2011 um 12:52

    Hey Leute

    Ich würde gerne die Auflösung einer Videodatei ermitteln, in der SB wurde ich auf ExtProp.au3 hingewiesen, aber diese gibt mir keine Auflösung(bzw. width/height).

    Hier mal mein Ansatz ;)

    Spoiler anzeigen
    [autoit]

    #include<Array.au3>
    $var = _GetExtProperty("C:\Users\Florian\Videos\Diximan.wmv",-1)
    _ArrayDisplay($var)
    ;===============================================================================
    ; Function Name: GetExtProperty($sPath,$iProp)
    ; Description: Returns an extended property of a given file.
    ; Parameter(s): $sPath - The path to the file you are attempting to retrieve an extended property from.
    ; $iProp - The numerical value for the property you want returned. If $iProp is is set
    ; to -1 then all properties will be returned in a 1 dimensional array in their corresponding order.
    ; The properties are as follows:
    ; Name = 0
    ; Size = 1
    ; Type = 2
    ; DateModified = 3
    ; DateCreated = 4
    ; DateAccessed = 5
    ; Attributes = 6
    ; Status = 7
    ; Owner = 8
    ; Author = 9
    ; Title = 10
    ; Subject = 11
    ; Category = 12
    ; Pages = 13
    ; Comments = 14
    ; Copyright = 15
    ; Artist = 16
    ; AlbumTitle = 17
    ; Year = 18
    ; TrackNumber = 19
    ; Genre = 20
    ; Duration = 21
    ; BitRate = 22
    ; Protected = 23
    ; CameraModel = 24
    ; DatePictureTaken = 25
    ; Dimensions = 26
    ; Width = 27
    ; Height = 28
    ; Company = 30
    ; Description = 31
    ; FileVersion = 32
    ; ProductName = 33
    ; ProductVersion = 34
    ; Requirement(s): File specified in $spath must exist.
    ; Return Value(s): On Success - The extended file property, or if $iProp = -1 then an array with all properties
    ; On Failure - 0, @Error - 1 (If file does not exist)
    ; Author(s): Simucal ([email='Simucal@gmail.com'][/email])
    ; Note(s):
    ;
    ;===============================================================================
    Func _GetExtProperty($sPath, $iProp)
    Local $iExist, $sFile, $sDir, $oShellApp, $oDir, $oFile, $aProperty, $sProperty
    $iExist = FileExists($sPath)
    If $iExist = 0 Then
    SetError(1)
    Return 0
    Else
    $sFile = StringTrimLeft($sPath, StringInStr($sPath, "\", 0, -1))
    $sDir = StringTrimRight($sPath, (StringLen($sPath) - StringInStr($sPath, "\", 0, -1)))
    $oShellApp = ObjCreate ("shell.application")
    $oDir = $oShellApp.NameSpace ($sDir)
    $oFile = $oDir.Parsename ($sFile)
    If $iProp = -1 Then
    Local $aProperty[35]
    For $i = 0 To 34
    $aProperty[$i] = $oDir.GetDetailsOf ($oFile, $i)
    Next
    Return $aProperty
    Else
    $sProperty = $oDir.GetDetailsOf ($oFile, $iProp)
    If $sProperty = "" Then
    Return 0
    Else
    Return $sProperty
    EndIf
    EndIf
    EndIf
    EndFunc ;==>_GetExtProperty

    [/autoit]

    Ich hoffe ihr könnt mir helfen

    DFPWare

  • Music player/Radio verbessern

    • DFPWare
    • 20. Mai 2011 um 16:48

    Hey Leute ich hab mal meinen Music player und meinen Radiostream player zusammengepackt und es ein wenig "designt" wenn man das so nennen darf ;)

    Spoiler anzeigen
    [autoit]

    #include <Sound.au3>
    #include <File.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <GuiListView.au3>
    OnAutoItExitRegister("_EXIT")
    Dim $Sender[6]=[ "http://www.wdr.de/wdrlive/media/einslive.asx", _
    "http://player.ffn.de/tunein_ffn.asx", _
    "http://ndr-ndr1niedersachsen-hi-wma.wm.llnwd.net/ndr_ndr1niedersachsen_hi_wma", _
    "mms://gffstream-wm-w24a.wm.llnwd.net/gffstream_wm_w24b", _
    "http://gffstream.ic.llnwd.net/stream/gffstream_einslive_a", _
    "http://listen.technobase.fm/tunein-dsl-pls" ]
    $oWMP = ObjCreate ( "WMPLayer.ocx" )
    $oWMP.URL = $Sender[0]
    $oWMP.controls.stop()
    $vol = 100
    Dim $RadioItem[6]
    Global $pfad = @UserProfileDir&"\Music\"
    Global $titel = _FileListToArray($pfad,"*.mp3",1)
    If IsArray($titel) = 0 Then
    MsgBox(0,"ERROR","In dem ausgewählten Verzeichnis befinden sich keine .mp3 Dateien")
    $pfad = FileSelectFolder("*MP3 Dateien angeben","C:")
    $titel = _FileListToArray($pfad,"*.mp3",1)
    EndIf
    Global $titelnummer = 1
    Global $sound
    Global $volume = 100
    Global $titelgui = "Music Player - " & $titel[$titelnummer]
    Global $size = UBound($titel)
    Global $var = 1
    Global $balken
    Global $shuffle = 1
    Dim $groessetitel[$size]
    Dim $listitem[$size]
    Dim $string
    Dim $length[5]
    SoundSetWaveVolume($volume)
    $Taschenrechner = GUICreate("Taschenrechner",500,530,-1,-1,$WS_POPUP)
    GUISetBkColor(0x000000)
    $verschiebungscontrol=GUICtrlCreateLabel("",220,0,220,40,"",$GUI_WS_EX_PARENTDRAG)
    $bClose = GUICtrlCreateButton("X",470,10,20,20)
    $bMinimize = GUICtrlCreateButton("_",440,10,20,20)
    $bMusic = GUICtrlCreateButton("Musicplayer",10,10,100,20)
    $bRadio = GUICtrlCreateButton("Radio",120,10,100,20)
    $MusicB1 = GUICtrlCreateButton("<",10,40,50,50)
    $MusicB2 = GUICtrlCreateButton(">",70,40,50,50)
    $MusicB3 = GUICtrlCreateButton("+",130,40,50,50)
    $MusicB4 = GUICtrlCreateButton("-",190,40,50,50)
    $MusicB5 = GUICtrlCreateButton("| |",250,40,50,50)
    $MusicB6 = GUICtrlCreateButton("Musik auswählen",310,40,110,50)
    $MusicL1 = GUICtrlCreateLabel("Volume: "&$volume&"%",40,100)
    $MusicL2 = GUICtrlCreateLabel("Titelanzahl: "&$size-1,150,100)
    $MusicL3 = GUICtrlCreateLabel("Aktueller Titel: "&$titelnummer,260,100)
    GUICtrlSetColor($MusicL1,0xFFFFAA)
    GUICtrlSetColor($MusicL2,0xFFFFAA)
    GUICtrlSetColor($MusicL3,0xFFFFAA)
    $MusicP = GUICtrlCreateProgress(10,130,480,20)
    $MusicList = GUICtrlCreateListView("Nr.|Titel |Größe|Länge",10,160,480,360)
    $RadioStart = GUICtrlCreateButton("Start",10,40,100,50)
    $RadioStop = GUICtrlCreateButton("Stop",120,40,100,50)
    $RadioLauter = GUICtrlCreateButton("+",230,40,50,50)
    $RadioLeiser = GUICtrlCreateButton("-",290,40,50,50)
    $RadioList = GUICtrlCreateListView("Name|URL",10,100,480,420)
    GUICtrlSetState($RadioLauter,$GUI_HIDE)
    GUICtrlSetState($RadioLeiser,$GUI_HIDE)
    GUICtrlSetState($RadioStart,$GUI_HIDE)
    GUICtrlSetState($RadioStop,$GUI_HIDE)
    GUICtrlSetState($RadioList,$GUI_HIDE)
    DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Taschenrechner, "int", 200, "long", 0x00040010)
    GUISetState()
    getgroesse()
    listefuellen()
    play($titelnummer)
    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $bClose
    Exit
    Case $msg = $bMinimize
    GUISetState(@SW_MINIMIZE)
    Case $msg = $bRadio
    GUICtrlSetState($MusicB1,$GUI_HIDE)
    GUICtrlSetState($MusicB2,$GUI_HIDE)
    GUICtrlSetState($MusicB3,$GUI_HIDE)
    GUICtrlSetState($MusicB4,$GUI_HIDE)
    GUICtrlSetState($MusicB5,$GUI_HIDE)
    GUICtrlSetState($MusicB6,$GUI_HIDE)
    GUICtrlSetState($MusicL1,$GUI_HIDE)
    GUICtrlSetState($MusicL2,$GUI_HIDE)
    GUICtrlSetState($MusicL3,$GUI_HIDE)
    GUICtrlSetState($MusicP,$GUI_HIDE)
    GUICtrlSetState($MusicList,$GUI_HIDE)
    GUICtrlSetState($RadioLauter,$GUI_SHOW)
    GUICtrlSetState($RadioLeiser,$GUI_SHOW)
    GUICtrlSetState($RadioStart,$GUI_SHOW)
    GUICtrlSetState($RadioStop,$GUI_SHOW)
    GUICtrlSetState($RadioList,$GUI_SHOW)
    $var = 1
    playpause()
    Case $msg = $bMusic
    GUICtrlSetState($MusicB1,$GUI_SHOW)
    GUICtrlSetState($MusicB2,$GUI_SHOW)
    GUICtrlSetState($MusicB3,$GUI_SHOW)
    GUICtrlSetState($MusicB4,$GUI_SHOW)
    GUICtrlSetState($MusicB5,$GUI_SHOW)
    GUICtrlSetState($MusicB6,$GUI_SHOW)
    GUICtrlSetState($MusicL1,$GUI_SHOW)
    GUICtrlSetState($MusicL2,$GUI_SHOW)
    GUICtrlSetState($MusicL3,$GUI_SHOW)
    GUICtrlSetState($MusicP,$GUI_SHOW)
    GUICtrlSetState($MusicList,$GUI_SHOW)
    GUICtrlSetState($RadioLauter,$GUI_HIDE)
    GUICtrlSetState($RadioLeiser,$GUI_HIDE)
    GUICtrlSetState($RadioStart,$GUI_HIDE)
    GUICtrlSetState($RadioStop,$GUI_HIDE)
    GUICtrlSetState($RadioList,$GUI_HIDE)
    $oWMP.controls.stop()
    Case $msg = $MusicB1
    vorher()
    Case $msg = $MusicB2
    nachher()
    Case $msg = $MusicB3
    lauter()
    Case $msg = $MusicB4
    leiser()
    Case $msg = $MusicB5
    playpause()
    Case $msg = $MusicB6
    pfadaendern()
    Case $msg = $RadioStart
    $oWMP.controls.play()
    Case $msg = $RadioStop
    $oWMP.controls.stop()
    Case $msg = $RadioLauter
    If $vol < 100 then $vol += 10
    $oWMP.settings.volume = $vol
    Case $msg = $RadioLeiser
    If $vol > 0 Then $vol -= 10
    $oWMP.settings.volume = $vol
    Case $msg = $RadioItem[0]
    $oWMP.controls.stop()
    $oWMP.URL = $Sender[0]
    $oWMP.controls.play()
    Case $msg = $RadioItem[1]
    $oWMP.controls.stop()
    $oWMP.URL = $Sender[1]
    $oWMP.controls.play()
    Case $msg = $RadioItem[2]
    $oWMP.controls.stop()
    $oWMP.URL = $Sender[2]
    $oWMP.controls.play()
    Case $msg = $RadioItem[3]
    $oWMP.controls.stop()
    $oWMP.URL = $Sender[3]
    $oWMP.controls.play()
    Case $msg = $RadioItem[4]
    $oWMP.controls.stop()
    $oWMP.URL = $Sender[4]
    $oWMP.controls.play()
    Case $msg = $RadioItem[5]
    $oWMP.controls.stop()
    $oWMP.URL = $Sender[5]
    $oWMP.controls.play()
    EndSelect
    For $i=1 To $size-1
    Switch $msg
    Case $listitem[$i]
    anderer($i)
    EndSwitch
    Next
    titelende()
    setbalken()
    WEnd
    Func play($nummer)
    $sound = _SoundOpen($pfad&$titel[$nummer])
    _SoundPlay($sound, 0)
    EndFunc
    Func vorher()
    If $titelnummer >= 2 Then
    _SoundClose($sound)
    $titelvorher = $titelgui
    $titelnummer = $titelnummer - 1
    play($titelnummer)
    $titelnachher = "Music Player - " & $titel[$titelnummer]
    WinSetTitle($titelvorher,"",$titelnachher)
    $titelgui = $titelnachher
    GUICtrlSetData($MusicL3,"Aktueller Titel: "&$titelnummer)
    Else
    _SoundClose($sound)
    $titelvorher = $titelgui
    $titelnummer = $size-1
    play($titelnummer)
    $titelnachher = "Music Player - " & $titel[$titelnummer]
    WinSetTitle($titelvorher,"",$titelnachher)
    $titelgui = $titelnachher
    GUICtrlSetData($MusicL3,"Aktueller Titel: "&$titelnummer)
    EndIf
    EndFunc
    Func nachher()
    If $titelnummer <= $size-2 Then
    _SoundClose($sound)
    $titelvorher = $titelgui
    $titelnummer = $titelnummer + 1
    play($titelnummer)
    $titelnachher = "Music Player - " & $titel[$titelnummer]
    WinSetTitle($titelvorher,"",$titelnachher)
    $titelgui = $titelnachher
    GUICtrlSetData($MusicL3,"Aktueller Titel: "&$titelnummer)
    Else
    _SoundClose($sound)
    $titelvorher = $titelgui
    $titelnummer = 1
    play($titelnummer)
    $titelnachher = "Music Player - " & $titel[$titelnummer]
    WinSetTitle($titelvorher,"",$titelnachher)
    $titelgui = $titelnachher
    GUICtrlSetData($MusicL3,"Aktueller Titel: "&$titelnummer)
    EndIf
    EndFunc
    Func lauter()
    If $volume < 100 Then
    $volume = $volume + 10
    EndIf
    SoundSetWaveVolume($volume)
    GUICtrlSetData($MusicL1,"Volume: "&$volume&"%")
    EndFunc
    Func leiser()
    If $volume > 0 Then
    $volume = $volume - 10
    EndIf
    SoundSetWaveVolume($volume)
    GUICtrlSetData($MusicL1,"Volume: "&$volume&"%")
    EndFunc
    Func playpause()
    If $var = 1 Then
    _SoundPause($sound)
    GUICtrlSetData($MusicB5,"|>")
    $var = $var*-1
    Else
    _SoundResume($sound)
    GUICtrlSetData($MusicB5,"| |")
    $var = $var*-1
    EndIf
    EndFunc
    Func listefuellen()
    For $i=1 To $size-1
    $length1 = _SoundLength($pfad&$titel[$i])
    $length2 = StringSplit($length1,":")
    $length = $length2[2]&":"&$length2[3]
    $listitem[$i] = GUICtrlCreateListViewItem($i&"|"&$titel[$i]&"|"&$groessetitel[$i]&"|"&$length,$MusicList)
    Next
    $RadioItem[0] = GUICtrlCreateListViewItem("EINSLIVE|"&$Sender[0],$RadioList)
    $RadioItem[1] = GUICtrlCreateListViewItem("FFN|"&$Sender[1],$RadioList)
    $RadioItem[2] = GUICtrlCreateListViewItem("NDR|"&$Sender[2],$RadioList)
    $RadioItem[3] = GUICtrlCreateListViewItem("WDR2|"&$Sender[3],$RadioList)
    $RadioItem[4] = GUICtrlCreateListViewItem("EINSLIVE DIGGI|"&$Sender[4],$RadioList)
    $RadioItem[5] = GUICtrlCreateListViewItem("TECHNOBASE|"&$Sender[5],$RadioList)
    EndFunc
    Func getgroesse()
    For $i=1 To $size-1
    $groessetitel[$i] = FileGetSize($pfad&$titel[$i])/1000000
    $groessetitel[$i] = Round($groessetitel[$i],2)
    Next
    EndFunc
    Func anderer($anderer)
    _SoundClose($sound)
    $titelvorher = $titelgui
    play($anderer)
    $titelnachher = "Music Player - " & $titel[$anderer]
    WinSetTitle($titelvorher,"",$titelnachher)
    GUICtrlSetData($MusicL3,"Aktueller Titel: "&$anderer)
    $titelgui = "Music Player - " & $titel[$anderer]
    EndFunc
    Func setbalken()
    $length = _SoundLength($sound)
    $pos = _SoundPos($sound)
    $string1 = StringSplit($pos,":")
    $string2 = StringSplit($length,":")
    $lengthrichtig = $string2[2]*60+$string2[3]
    $posrichtig = $string1[2]*60+$string1[3]
    $balken = $posrichtig/$lengthrichtig*100
    GUICtrlSetData($MusicP,$balken)
    EndFunc
    Func titelende()
    If _SoundPos($sound) = _SoundLength($sound) Then
    nachher()
    EndIf
    EndFunc
    Func pfadaendern()
    _SoundClose($sound)
    _GUICtrlListView_DeleteAllItems($MusicList)
    $pfadzwischen = FileSelectFolder("Musikordner auswählen","")
    $pfad = $pfadzwischen&"\"
    $titel = _FileListToArray($pfad,"*.mp3",1)
    $size = UBound($titel)
    listefuellen()
    EndFunc
    Func _EXIT()
    DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Taschenrechner, "int", 200, "long", 0x00050010)
    EndFunc

    [/autoit]

    Vielleicht könnt ihr mir ja sagen was ich noch so verbesser kann, also designtechnisch und/oder neue Funktionen

    Danke

    DFPWare

  • Muss nen Auto IT Einführungskurs organisieren - Druckerei für Werbung?

    • DFPWare
    • 20. Mai 2011 um 16:45

    Boah seid ihr fies xD

    aber ist echt witzig :rofl:

  • Doppelgeburtstag

    • DFPWare
    • 20. Mai 2011 um 16:44

    Happy Birthday ihr beiden ;)

    DFPWare

  • Wie sieht euer Desktop aus?

    • DFPWare
    • 19. Mai 2011 um 21:16

    Wie jetzt?

    Du meldes dich da an und bekommst mega viel Software um sonst?

    Wow wie geil warum macht das nich jeder?

    DFPWare

  • Wie sieht euer Desktop aus?

    • DFPWare
    • 18. Mai 2011 um 20:11

    wow sorry fürs pushen ;)

    Marthog: dein Link funktioniert nich

    DFPWare

  • Wie sieht euer Desktop aus?

    • DFPWare
    • 18. Mai 2011 um 19:42
    Zitat

    Oder gar ein abgehobenses Alien Design?

    kannst du mir vielleicht mal verraten woher du das weißt?

    Nein ich habe keinen Alienware PC, find das design aber geil :D

    Dateien

    Neue Bitmap.bmp 997,11 kB – 398 Downloads
  • Shortcut aktivieren

    • DFPWare
    • 18. Mai 2011 um 18:27

    Wenn du mit Shortcut meinst, dass wenn du eine Taste drückst etwas passieren soll, dann kann ich dir _IsPressed() ans Herz legen ;)

    DFPWare

  • Rechtsfrage

    • DFPWare
    • 18. Mai 2011 um 17:52

    Also ich hab 2 Jahre M2 Pserver gezokt und ich lebe immer noch oder?:D

    Pserver spielen ist nicht illegal würd ich sagen, aber mach bloß keinen eigenen, weil das ist zu 99% illegal, aber soll dir doch egal sein wenn der Betreiber erwischt wird oder?

    DFPWare

  • Bakku ist 16

    • DFPWare
    • 15. Mai 2011 um 15:41

    Schon wieder nen 16. ;)

    Glückwunsch auch meinerseits ;)

    DFPWare

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™