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. Alizame

Beiträge von Alizame

  • Aufzeichnen -> TCP -> Abspielen (BassUDF)

    • Alizame
    • 7. August 2012 um 12:00

    ja,

    Also: bei den ganzen bass udf beispielen ist eine "TCP_SEND.au3" und eine "TCP_RECEIVE.au3".
    du musst die TCP_RECEIVE.au3 kompilieren und die TCP_SEND.au3 starten, dann hörste alles was du sagst kurz später nochmal ;D

    übers internet musste dann die ip in den scripten ändern, und warscheinlich den port freigeben.

  • DANKE an Alle

    • Alizame
    • 2. August 2012 um 01:46

    Ich finde es auch gut hier zu sein, das Forum ist schon ein wenig Familie und ich hoffe ,dass das noch lange so bleibt.

  • Xorianator...

    • Alizame
    • 31. Juli 2012 um 00:46

    glückwunsch auch von mir

    und :party: schön

  • Programmierprojekt(e)

    • Alizame
    • 3. Juli 2012 um 23:20

    was hast du denn ungefähr vor?
    (wenn dann skype bei mir)

  • Surprise!

    • Alizame
    • 1. Juli 2012 um 00:02

    Echt unterhaltsam!
    xD

  • Eine Kugel mit sehr vielen Punkten...

    • Alizame
    • 28. Juni 2012 um 22:34

    ich löse es mal auf xD:
    bei normalen "Usern" steht dort "User".
    Poweruser (was "UEZ" ist) können diesen text dort ändern. und weil "UEZ" seit 2008 dabei ist, sind dies 4 jahre.
    also lernt "UEZ" seit 4 jahren AutoIt (naja, sagen wir er kann es seit 4 Jahren. ich glaube der musste das garnicht lernen ;D)

  • Snippet-Code

    • Alizame
    • 26. Juni 2012 um 21:24

    ich hätte was dafür:

    Spoiler anzeigen
    [autoit]

    MsgBox(0,"",_map(536,0,1024,0,10)) ;ergebnis ist 5

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

    Func _map($iX, $iIMin, $iIMax, $iOMin, $iOMax)
    $iOut = Round(($iX - $iIMin) * ($iOMax - $iOMin) / ($iIMax - $iIMin) + $iOMin)
    If $iOMax < $iOut Then $iOut = $iOMax
    If $iOMin > $iOut Then $iOut = $iOMin
    Return $iOut
    EndFunc ;==>_map

    [/autoit]

    das ist eine funktion, die gibt es auch beim arduino, deswegen hab ich die in autoit gemacht(ist ja nix dolles)
    Edit: also, man hat einen X wert. dieser X wert hat eine maximale und eine minimale "Spannweite",
    und man hat den minimalen und den maximalen "ausgangswert"

    [autoit]

    _map(X,MinSpannweite,MaxSpannweite,MinAusgangswert,MaxAusgangswert)

    [/autoit]
  • Blume feiert!

    • Alizame
    • 24. Juni 2012 um 10:19

    happy birthday

  • L3viathan hat die 20 erreicht!

    • Alizame
    • 17. Juni 2012 um 23:09

    happy birthday L3v

  • Multithreading

    • Alizame
    • 17. Juni 2012 um 21:29

    als 1. Forensuche!
    als 2.

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>

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

    $Form1 = GUICreate("Form1", 171, 111,550)
    $ButtonVonGui1 = GUICtrlCreateButton("Button1", 8, 24, 153, 57)
    GUISetState(@SW_SHOW)

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

    $Form2 = GUICreate("Form2", 171, 111,750)
    $ButtonVonGui2 = GUICtrlCreateButton("Button2", 8, 24, 153, 57)
    GUISetState(@SW_SHOW)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $ButtonVonGui1
    MsgBox(0,"GUI1","Button1")
    Case $ButtonVonGui2
    MsgBox(0,"GUI2","Button2")

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

    EndSwitch
    WEnd

    [/autoit]
  • Alizame's MusikPlayer

    • Alizame
    • 16. Juni 2012 um 23:10
    Zitat

    Jetzt noch ein paar Funktionen mehr, wie z.B. zufällige Wiedergabe oder Bewertung/Favoriten


    wird schwierig xD
    die lösung der wiedergabeliste ist echt, ähmmm, "toll" X(

    Zitat

    und nen eigenen Rahmen um das Fenster und dein Musikplayer ist nahezu perfekt.


    wie soll das denn ungefähr aussehen?

    Edit: Doppelpost X(

  • WinXP Automatische Hardwareerkennung beim Sysstart deaktivieren?

    • Alizame
    • 10. Juni 2012 um 15:30

    du könntest ein script mit einer endlosschleife und der auszuführenden funktion machen.
    mit

    [autoit]

    OnAutoItExitRegister(...)

    [/autoit]


    kannst du machen, das bevor dein script beendet wird, eine funktion ausgeführt wird

  • Alizame's MusikPlayer

    • Alizame
    • 9. Juni 2012 um 21:28

    Danke ;D

  • Alizame's MusikPlayer

    • Alizame
    • 9. Juni 2012 um 20:58

    X( nimmst du irgendwas?
    naja habs jetzt mit in die rar gepackt
    Edit: xD

  • Alizame's MusikPlayer

    • Alizame
    • 9. Juni 2012 um 20:14

    Alizame's (Zusammengeklauter ;D ) Player

    Hier mein Player mit ganz vielen Codeteilen von Usern aus dem Forum, wo ich mir nicht die Namen aufgeschrieben habe, weil ich nicht dachte,
    dass der Player so gut wird, dass ich ihn jemals hier posten würde.
    btw: Wenn diese betroffenen User sich melden könnten, wäre total nett.

    Also hier das Script:
    (Alpha, da über mehrere Monate programmiert wurde, und ich damals noch viel schlechter war als jetzt >.>)

    Spoiler anzeigen
    [autoit]

    #include <Bass.au3>
    #include <BassTags.au3>
    #include <GDIPlus.au3>
    #include <Misc.au3>
    #include <File.au3>
    #include <Sound.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <ProgressConstants.au3>
    #include <ButtonConstants.au3>
    #include <ListViewConstants.au3>
    #include <BassConstants.au3>
    #include <StructureConstants.au3>

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

    Opt('GUIOnEventMode', 1)
    ;~ Opt('MustDeclareVars', 1)
    #Region#Init#######################################################################################
    Const $sName = "Alizame's Player", $bTray = True
    Local $gaDropFiles[1], $iDropItem = -1, $sz = 0, $iPlaylist = "|", $sFile = "", $bListShow = True
    Local $iPos, $iSecs, $aInfo, $iPercent,$Datei, $PathSplit, $iNext, $iBack, $sz2, $aString, $aSplit
    Local $sListPath, $aSave, $aList, $sListPath, $aList, $sItem, $iRunter = 0.25, $iMaxL = 10, $iMaxR = 10
    Local $iNumber, $iValL = 4, $iValR = 4
    Local $iPlay = 0 ;0 = stopp, 1 = play, 2 = pause

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

    Global $iPeakL, $iPeakR, $iHigh = 32768, $iLength, $iSeconds, $iOld
    Global $iWidth = 500, $sPath, $hSoundOpen, $sID3Tags, $iMuell, $bWiederholen = False;, $bPlay = 0

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

    _BASS_STARTUP('bass\bass.dll')
    _Bass_Tags_Startup('bass\BassTags.dll')
    _BASS_Init(0, -1, 44100, 0, '')
    If @error Then Exit MsgBox(16, '', 'Fehler!' & @CRLF & 'Die Soundkarte konnte nicht initialisiert werden!')

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

    Local $hGui = GUICreate($sName, 560, 450, -1, -1, -1, $WS_EX_ACCEPTFILES)
    GUISetBkColor(0x222222)

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

    Local $hLabel = GUICtrlCreateLabel('Select File...', 50, 20, 500, 28)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    GUICtrlSetFont(-1, 14, 400, 0, 'Times New Roman')
    GUICtrlSetColor(-1, 0xFFFFAA)
    GUISetOnEvent($GUI_EVENT_CLOSE, '_Exit')

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

    GUICtrlCreateLabel('Position', 5, 51, 40, 20, $SS_RIGHT)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    GUICtrlSetFont(-1, 9, 400, 0, 'Times New Roman')
    GUICtrlSetColor(-1, 0xFFFFAA)

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

    DllCall('uxtheme.dll', 'none', 'SetThemeAppProperties', 'int', 0) ; Classic-Style
    Local $hPosition = GUICtrlCreateProgress(50, 50, 500, 20, $PBS_SMOOTH)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    GUICtrlSetBkColor(-1, 0x333333)
    GUICtrlSetColor(-1, 0x600000)
    DllCall('uxtheme.dll', 'none', 'SetThemeAppProperties', 'int', 7) ; Standard-Windows-Style
    Local $aPos = ControlGetPos($hGui, '', $hPosition)

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

    Local $hDuration = GUICtrlCreateLabel('00:00 / 00:00', 220, 75, 120, 32)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    GUICtrlSetFont(-1, 14, 400, 0, 'Tahoma')
    GUICtrlSetColor(-1, 0xFFFFAA)

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

    GUICtrlCreateLabel('Left', 5, 108, 40, 20, $SS_RIGHT)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    GUICtrlSetFont(-1, 9, 400, 0, 'Times New Roman')
    GUICtrlSetColor(-1, 0xFFFFAA)

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

    GUICtrlCreateLabel('Right', 5, 138, 40, 20, $SS_RIGHT)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    GUICtrlSetFont(-1, 9, 400, 0, 'Times New Roman')
    GUICtrlSetColor(-1, 0xFFFFAA)

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

    Local $Button1 = GUICtrlCreateCheckbox("Wiederholen", 64, 170, 70, 30, BitOR($BS_PUSHLIKE, $BS_AUTOCHECKBOX))
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    Local $Button2 = GUICtrlCreateButton("Zurück", 136, 170, 70, 30)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    GUICtrlSetOnEvent(-1, "_Event_Back")
    Local $Button3 = GUICtrlCreateButton("Pause/Play", 208, 170, 70, 30)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    GUICtrlSetOnEvent(-1, '_Button_Play')
    Local $Button4 = GUICtrlCreateButton("Stopp", 280, 170, 70, 30)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    GUICtrlSetOnEvent(-1, '_Button_Stopp')
    Local $Button5 = GUICtrlCreateButton("Vor", 352, 170, 70, 30)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    GUICtrlSetOnEvent(-1, "_Event_Next")
    Local $Button6 = GUICtrlCreateButton("Playlist", 424, 170, 70, 30)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    GUICtrlSetOnEvent(-1, "_ShowPlaylist")

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

    Local $listview = GUICtrlCreateListView("Name|Länge|Endung|Ort", 5, 225, 550, 185)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 426)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 60)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 60)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 3, 0)
    GUICtrlSetState($listview, $GUI_DROPACCEPTED)
    Local $hWndListView = GUICtrlGetHandle($listview)
    GUIRegisterMsg($WM_DROPFILES, 'WM_DROPFILES_FUNC')
    GUIRegisterMsg(0x004E, "_DoubleClickOnListView")

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

    Local $Button7 = GUICtrlCreateButton("Lied hinzufügen", 59, 196 + 220, 105, 25)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    GUICtrlSetOnEvent($Button7, "_Event_AddFile")
    Local $Button8 = GUICtrlCreateButton("Lied entfernen", 171, 196 + 220, 105, 25)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    GUICtrlSetOnEvent($Button8, "_Event_DelFile")
    Local $Button9 = GUICtrlCreateButton("Playlist speichern", 283, 196 + 220, 105, 25)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    GUICtrlSetOnEvent($Button9, "_Event_Save")
    Local $Button10 = GUICtrlCreateButton("Playlist laden", 395, 196 + 220, 105, 25)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    GUICtrlSetOnEvent($Button10, "_Event_Load")
    GUISetState()

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

    _GDIPlus_Startup()
    Local $hBackgr = _GDIPlus_BrushCreateSolid(0xFF222222)
    Local $hBrushGreen = _GDIPlus_BrushCreateSolid(0xFF88FF00)
    Local $hBrushRed = _GDIPlus_BrushCreateSolid(0xFF7700FF)
    Local $hPenGrey = _GDIPlus_PenCreate(0xFF888888, 1)
    Local $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui)
    Local $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iWidth, 44, $hGraphic)
    Local $hBuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    _GDIPlus_GraphicsFillRect($hBuffer, 0, 0, $iWidth, 44, $hBackgr)

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

    _GDIPlus_GraphicsDrawRect($hBuffer, 0, 0, $iWidth-1, 15, $hPenGrey)
    _GDIPlus_GraphicsDrawRect($hBuffer, 0, 27, $iWidth - 1, 15, $hPenGrey)
    _GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 50, 110, $iWidth, 44)
    AdlibRegister("_VU_Meter", 20)
    #EndRegion#Init####################################################################################

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

    While Sleep(100)

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

    If _IsPressed("B3") Then _Button_Play()
    If _IsPressed("B2") Then _Button_Stopp()
    If _IsPressed("B1") Then _Event_Back()
    If _IsPressed("B0") Then _Event_Next()

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

    _VU_Meter()
    If _BASS_ChannelIsActive($hSoundOpen) = $BASS_ACTIVE_STOPPED And $bWiederholen = True And $iPlay = 1 Then
    _BASS_ChannelPlay($hSoundOpen, 0)
    ElseIf _BASS_ChannelIsActive($hSoundOpen) = $BASS_ACTIVE_STOPPED And $iPlay = 1 Then
    _Event_Next()
    EndIf

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

    $iPos = _BASS_ChannelGetPosition($hSoundOpen, $BASS_POS_BYTE)
    $iSecs = Int(_BASS_ChannelBytes2Seconds($hSoundOpen, $iPos))
    If $iSecs <> $iOld Then
    $iOld = $iSecs
    GUICtrlSetData($hDuration, _FormatTime($iSecs, $iSeconds))
    EndIf
    GUICtrlSetData($hPosition, Int(100 / $iLength * $iPos))

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

    If WinActive($hGui) Then
    If BitAND(GUICtrlRead($Button1), 1) Then
    $bWiederholen = True
    Else
    $bWiederholen = False
    EndIf

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

    $aInfo = GUIGetCursorInfo($hGui)
    If $aInfo[4] = $hPosition And _IsPressed(01) Then
    Do
    $aInfo = GUIGetCursorInfo($hGui)
    $iPercent = 100 / $aPos[2] * ($aInfo[0] - $aPos[0])
    GUICtrlSetData($hPosition, $iPercent)
    Until Not _IsPressed(01)
    _BASS_ChannelSetPosition($hSoundOpen, ($iLength * $iPercent / 100), $BASS_POS_BYTE)
    EndIf

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

    If _IsPressed("2E") Then _Event_DelFile()
    EndIf
    WEnd

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

    #Region#Funcs######################################################################################
    Func _ShowPlaylist()
    If $bListShow = True Then
    ;MoveOut
    WinActivate($hGui)
    _WinSetSize($hGui, 566, 241, 5, 6)
    $bListShow = False
    Else
    ;MoveIn
    WinActivate($hGui)
    _WinSetSize($hGui, 566, 476, 5, 6)
    $bListShow = True
    EndIf
    EndFunc ;==>_ShowPlaylist

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

    Func _Button_Stopp()
    _BASS_ChannelStop($hSoundOpen)
    GUICtrlSetBkColor($sz, 0xFFFFFF)
    GUICtrlSetData($hLabel, "Select File...")
    GUICtrlSetData($hDuration, "00:00 / 00:00")
    $iPlay = 0
    EndFunc ;==>_Button_Stopp

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

    Func _Button_Play()
    If $iPlay = 2 Then
    _BASS_ChannelPlay($hSoundOpen, 0)
    $iPlay = 1
    ElseIf $iPlay = 1 Then
    _BASS_ChannelPause($hSoundOpen)
    $iPlay = 2
    ElseIf $iPlay = 0 Then
    _Event_Play(20)
    $iPlay = 1
    EndIf
    EndFunc ;==>_Button_Play

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

    Func _VU_Meter()
    If Not $hSoundOpen Then Return

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

    ;~ _GDIPlus_GraphicsFillRect($hBuffer, 3, 3, $iMaxR + 30, 10, $hBackgr)
    DllCall($ghGDIPDll, "int", "GdipFillRectangleI", "handle", $hBuffer, "handle", $hBackgr, "int", $iValL, "int", 3, "int", $iMaxL + 3, "int", 10)
    ;~ _GDIPlus_GraphicsFillRect($hBuffer, 3, 30, $iMaxR + 30, 10, $hBackgr)
    DllCall($ghGDIPDll, "int", "GdipFillRectangleI", "handle", $hBuffer, "handle", $hBackgr, "int", $iValR, "int", 30, "int", $iMaxR + 3, "int", 10)

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

    Local $iLevel, $iLeft, $iRight, $iSecs, $iValL, $iValR
    $iLevel = _BASS_ChannelGetLevel($hSoundOpen)
    $iLeft = _LoWord($iLevel)
    If $iLeft > 32766 Then $iLeft = 0
    $iRight = _HiWord($iLevel)
    If $iRight > 32766 Then $iRight = 0
    If $iLeft > $iPeakL Then $iPeakL = $iLeft
    If $iRight > $iPeakR Then $iPeakR = $iRight
    $iValL = $iWidth / $iHigh * $iPeakL
    If $iValL > $iWidth - 8 Then $iValL = $iWidth - 8
    $iValR = $iWidth / $iHigh * $iPeakR
    If $iValR > $iWidth - 8 Then $iValR = $iWidth - 8
    $iPeakL -= 1200
    $iPeakR -= 1200

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

    Select
    Case $iMaxL < $iValL
    $iMaxL = $iValL
    Case $iMaxL > 4
    $iMaxL -= $iRunter
    EndSelect
    Select
    Case $iMaxR < $iValR
    $iMaxR = $iValR
    Case $iMaxR > 4
    $iMaxR -= $iRunter
    EndSelect

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

    ;~ ;_GDIPlus_GraphicsFillRect($hBuffer, 3, 3, $iValL * 0.9, 10, $hBrushGreen)
    DllCall($ghGDIPDll, "int", "GdipFillRectangleI", "handle", $hBuffer, "handle", $hBrushGreen, "int", 3, "int", 3, "int", $iValL, "int", 10)
    ;~ ;_GDIPlus_GraphicsFillRect($hBuffer, 3, 30, $iValR * 0.9, 10, $hBrushGreen)
    DllCall($ghGDIPDll, "int", "GdipFillRectangleI", "handle", $hBuffer, "handle", $hBrushGreen, "int", 3, "int", 30, "int", $iValR, "int", 10)

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

    ;~ _GDIPlus_GraphicsFillRect($hBuffer, $iMaxL, 3, 5, 10, $hBrushRed)
    DllCall($ghGDIPDll, "int", "GdipFillRectangleI", "handle", $hBuffer, "handle", $hBrushRed, "int", $iMaxL, "int", 3, "int", 5, "int", 10)
    ;~ _GDIPlus_GraphicsFillRect($hBuffer, $iMaxR, 30, 5, 10, $hBrushRed)
    DllCall($ghGDIPDll, "int", "GdipFillRectangleI", "handle", $hBuffer, "handle", $hBrushRed, "int", $iMaxR, "int", 30, "int", 5, "int", 10)

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

    ;~ _GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 50, 110, $iWidth, 44) ; 3x
    DllCall($ghGDIPDll, "int", "GdipDrawImageRectI", "handle", $hGraphic, "handle", $hBitmap, "int", 50, "int", 110, "int", $iWidth, "int", 44)
    DllCall($ghGDIPDll, "int", "GdipDrawImageRectI", "handle", $hGraphic, "handle", $hBitmap, "int", 50, "int", 110, "int", $iWidth, "int", 44)

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

    EndFunc ;==>_WM_TIMER

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

    Func _Exit()
    AdlibUnRegister()
    ;~ _Timer_KillAllTimers($hGui)
    _BASS_Free()
    _GDIPlus_BrushDispose($hBackgr)
    _GDIPlus_BrushDispose($hBrushGreen)
    _GDIPlus_PenDispose($hPenGrey)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_GraphicsDispose($hBuffer)
    _GDIPlus_BitmapDispose($hBitmap)
    _GDIPlus_Shutdown()
    Exit
    EndFunc ;==>_Exit

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

    Func _FormatTime($iSecs, $iAllSecs)
    Local $iMins, $iAllMins
    $iMins = Int($iSecs / 60)
    $iSecs = Mod($iSecs, 60)
    $iAllMins = Int($iAllSecs / 60)
    $iAllSecs = Mod($iAllSecs, 60)
    Return StringFormat('%02i:%02i / %02i:%02i', $iMins, $iSecs, $iAllMins, $iAllSecs)
    EndFunc ;==>_FormatTime

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

    Func _Event_AddFile($sFile = "")
    If $sFile = "" Then
    $sFile = FileOpenDialog("Dateien Hinzufügen", @MyDocumentsDir, "Musikdateien (*.mp3;*.wav;*.ogg)", 7)
    EndIf
    If @error Then Return

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

    Dim $szDrive, $szDir, $szFName, $szExt

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

    $Datei = StringSplit($sFile, "|")
    If $Datei[0] > 2 Then
    For $i = 2 To $Datei[0] Step 1
    $PathSplit = _PathSplit($Datei[$i], $szDrive, $szDir, $szFName, $szExt)
    If $PathSplit[4] = ".mp3" Or $PathSplit[4] = ".wav" Or $PathSplit[4] = ".ogg" Then
    $iSecs = _FormatSecs((_SoundLength($Datei[$i], 2) / 1000))
    $iID = GUICtrlCreateListViewItem($PathSplit[3] & "|" & $iSecs & "|" & $PathSplit[4] & "|" & $Datei[1] & "\" & $Datei[$i], $listview)
    $iPlaylist &= String($iID) & "|"
    ;~ MsgBox(0, "", $iPlaylist)
    GUICtrlSendMsg($listview, $LVM_SETCOLUMNWIDTH, 3, 0)
    EndIf
    Next
    ;~ MsgBox(0, "", $iPlaylist)
    Else
    $PathSplit = _PathSplit($sFile, $szDrive, $szDir, $szFName, $szExt)
    If @error Then MsgBox(0, "", "2:" & @error)
    $iSecs = _FormatSecs((_SoundLength($sFile, 2) / 1000))
    $iID = GUICtrlCreateListViewItem($PathSplit[3] & "|" & $iSecs & "|" & $PathSplit[4] & "|" & $sFile, $listview)
    $iPlaylist &= String($iID) & "|"
    GUICtrlSendMsg($listview, $LVM_SETCOLUMNWIDTH, 3, 0)
    GUICtrlSendMsg($listview, $LVM_SETCOLUMNWIDTH, 3, 0)
    EndIf
    $sFile = ""
    If $iPlay = 0 Then _Event_Play(20)
    EndFunc ;==>_Event_AddFile

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

    Func _Event_DelFile()
    $iPlaylist = StringReplace($iPlaylist, "|" & String(GUICtrlRead($listview)) & "|", "|")
    If $iNumber = GUICtrlRead($listview) Then _Button_Stopp()

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

    GUICtrlDelete(GUICtrlRead($listview))
    EndFunc ;==>_Event_DelFile

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

    Func _Event_Next()
    $iNext = StringSplit($iPlaylist, "|", 3)
    If $iNumber < (UBound($iNext) + 17) Then
    For $i = 1 To UBound($iNext) - 1
    If String($iNext[$i]) = $iNumber Then
    $iNumber = $iNext[$i] + 1
    _Event_Play($iNumber)
    ExitLoop
    EndIf
    Next
    Else
    _Event_Play(20)
    EndIf
    EndFunc ;==>_Event_Next

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

    Func _Event_Back()
    $iBack = StringSplit($iPlaylist, "|", 3)
    If $iNumber > 20 Then
    For $i = 1 To UBound($iBack)
    If String($iBack[$i]) = $iNumber Then
    $iNumber = $iBack[$i] - 1
    _Event_Play($iNumber)
    ExitLoop
    EndIf
    Next
    Else
    _Event_Play(UBound($iBack) + 17)
    EndIf
    EndFunc ;==>_Event_Back

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

    Func _Event_Play($iItemNumber)
    If $iItemNumber = "" Or $iItemNumber < 0 Or $iItemNumber = 1 Then $iItemNumber = 8
    GUICtrlSetBkColor($sz, 0xFFFFFF)
    $sz = $iItemNumber
    $iNumber = $iItemNumber
    $sz2 = GUICtrlRead($iItemNumber)
    ;name|länge|endung|ort
    $aString = StringSplit($sz2, '|', 1) ;$aString[4] = %ORT%
    If @error Or $aString[0] = 1 Then Return
    $iPlay = String($sz)
    GUICtrlSetBkColor($sz, 0xA0A0A0)

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

    If $hSoundOpen <> '' Then _BASS_ChannelStop($hSoundOpen)
    $hSoundOpen = _BASS_StreamCreateFile(False, $aString[4], 0, 0, BitOR($BASS_STREAM_PRESCAN, $BASS_STREAM_AUTOFREE))
    _BASS_ChannelPlay($hSoundOpen, 0)
    $iPlay = 1
    $iLength = _BASS_ChannelGetLength($hSoundOpen, $BASS_POS_BYTE)
    $iSeconds = _BASS_ChannelBytes2Seconds($hSoundOpen, $iLength)
    GUICtrlSetData($hDuration, _FormatTime(0, $iSeconds))
    $sID3Tags = _Bass_Tags_Read($hSoundOpen, '%IFV2(%ARTI,%ARTI,no artist) - %IFV2(%TITL,%TITL,no title)')
    $sID3Tags = StringReplace($sID3Tags, '&', '&&')
    If $sID3Tags <> "" And $sID3Tags <> " " And $sID3Tags <> "no artist - no title" And $sID3Tags <> "0" Then
    GUICtrlSetData($hLabel, $sID3Tags)
    TrayTip($sName,$sID3Tags,5)
    Else
    $aSplit = _PathSplit($aString[4], $iMuell, $iMuell, $iMuell, $iMuell)
    ;~ GUICtrlSetData($hLabel, $sID3Tags)
    GUICtrlSetData($hLabel, $aSplit[3])
    TrayTip($sName,$aSplit[3]&$aSplit[4],5)
    EndIf
    EndFunc ;==>_Event_Play

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

    Func _Event_Save()
    $sListPath = FileSaveDialog("Speicherort der Playlist wählen!", @MyDocumentsDir, "Playlist (*.m3u)")
    If @error Then Return
    If StringRight($sListPath, 4) <> ".m3u" Then $sListPath &= ".m3u"
    $aSave = StringSplit($iPlaylist, "|", 3)
    Local $hFile = FileOpen($sListPath, 2)
    If @error Then
    MsgBox(16, "Error!", "Save Error!")
    Return
    EndIf
    For $i = 1 To UBound($aSave) - 2
    $aList = StringSplit(GUICtrlRead($aSave[$i]), '|', 1) ;$aString[4] = %ORT%
    If IsArray($aList) And $aList[0] = 5 Then
    FileWriteLine($hFile, $aList[4])
    EndIf
    Next
    FileClose($hFile)
    EndFunc ;==>_Event_Save

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

    Func _Event_Load()
    $sListPath = FileOpenDialog("Playlist wählen!", @MyDocumentsDir, "Playlist (*.m3u)")
    $aList = StringSplit(FileRead($sListPath), @CRLF, 1)
    If IsArray($aList) Then
    For $i = 1 To $aList[0] - 1
    _Event_AddFile($aList[$i])
    Next
    EndIf
    EndFunc ;==>_Event_Save

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

    Func WM_DROPFILES_FUNC($hWnd, $msgID, $wParam, $lParam)
    Local $nSize, $pFileName
    Local $szDrive, $szDir, $szFName, $szExt
    Local $nAmt = DllCall('shell32.dll', 'int', 'DragQueryFileW', 'hwnd', $wParam, 'int', 0xFFFFFFFF, 'ptr', 0, 'int', 0)
    For $i = 0 To $nAmt[0] - 1
    $nSize = DllCall('shell32.dll', 'int', 'DragQueryFileW', 'hwnd', $wParam, 'int', $i, 'ptr', 0, 'int', 0)
    $nSize = $nSize[0] + 1
    $pFileName = DllStructCreate('wchar[' & $nSize & ']')
    DllCall('shell32.dll', 'int', 'DragQueryFileW', 'hwnd', $wParam, 'int', $i, 'ptr', DllStructGetPtr($pFileName), 'int', $nSize)
    ReDim $gaDropFiles[$i + 1]
    $gaDropFiles[$i] = DllStructGetData($pFileName, 1)
    $pFileName = 0
    $PathSplit = _PathSplit($gaDropFiles[$i], $szDrive, $szDir, $szFName, $szExt)
    If $PathSplit[4] = ".mp3" Or $PathSplit[4] = ".wav" Or $PathSplit[4] = ".ogg" Then
    $iSecs = _FormatSecs((_SoundLength($gaDropFiles[$i], 2) / 1000))
    $iID = GUICtrlCreateListViewItem($PathSplit[3] & "|" & $iSecs & "|" & $PathSplit[4] & "|" & $PathSplit[0], $listview)
    $iPlaylist &= String($iID) & "|"
    GUICtrlSendMsg($listview, $LVM_SETCOLUMNWIDTH, 3, 0)
    If $iPlay = "" Then _Event_Play(20)
    EndIf
    Next
    EndFunc ;==>WM_DROPFILES_FUNC

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

    Func _DoubleClickOnListView($hWndGUI, $msgID, $wParam, $lParam)
    Local $tagNMHDR, $event, $hwndFrom, $code
    $tagNMHDR = DllStructCreate("int;int;int", $lParam)
    If @error Then Return
    $event = DllStructGetData($tagNMHDR, 3)
    If $wParam = $listview Then
    If $event = $NM_DBLCLK Then

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

    $sItem = GUICtrlRead($listview)
    If $sItem <> 0 Then
    _Event_Play($sItem)

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

    EndIf
    EndIf
    EndIf
    $tagNMHDR = 0
    $event = 0
    $lParam = 0
    EndFunc ;==>_DoubleClickOnListView

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

    Func _FormatSecs($iAllSecs)
    Local $iAllMins
    $iAllMins = Int($iAllSecs / 60)
    $iAllSecs = Mod($iAllSecs, 60)
    Return StringFormat('%02i:%02i', $iAllMins, $iAllSecs)
    EndFunc ;==>_FormatSecs

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

    Func _WinSetSize($hWnd, $iWidth, $iHeigth, $iSleep = -1, $iStep = 4) ;by Gta Spider
    If $iSleep < 0 Then Return WinMove($hWnd, "", Default, Default, $iWidth, $iHeigth)
    Local $i, $iStepW = $iStep, $iStepH = $iStep, $iSin, $i2, $iLastI
    Local $aWinPos = WinGetPos($hWnd)
    If $iWidth < $aWinPos[2] Then $iStepW *= -1
    If $iHeigth < $aWinPos[3] Then $iStepH *= -1
    Local $iDegToRad = 3.14159265358979 / 180
    Local $iSinMulW = ($iWidth - $aWinPos[2]) / 2.5
    Local $iSinMulH = ($iHeigth - $aWinPos[3]) / 2.5
    If $iSinMulW < 0 Then $iSinMulW *= -1
    If $iSinMulH < 0 Then $iSinMulH *= -1
    If $iWidth <> $aWinPos[2] Then
    For $i = $aWinPos[2] To $iWidth Step $iStepW
    $iLastI = $i
    $iSin = $i - $aWinPos[2]
    $iSin = Sin($iDegToRad * (180 * $iSin / ($iWidth - $aWinPos[2])))
    WinMove($hWnd, "", Default, Default, $i + ($iSin * $iSinMulW), Default)
    _VU_Meter()
    Sleep($iSleep)
    Next
    If Mod($iWidth - $aWinPos[2], $iStep) Then
    If $iStepW < 0 Then
    $iStepW = -1
    Else
    $iStepW = 1
    EndIf
    For $i = $iLastI - 1 To $iWidth Step $iStepW
    WinMove($hWnd, "", Default, Default, $i, Default)
    _VU_Meter()
    Next
    EndIf
    EndIf
    If $iHeigth <> $aWinPos[3] Then
    For $i = $aWinPos[3] To $iHeigth Step $iStepH
    $iLastI = $i
    $iSin = $i - $aWinPos[3]
    $iSin = Sin($iDegToRad * (180 * $iSin / ($iHeigth - $aWinPos[3])))
    WinMove($hWnd, "", Default, Default, Default, $i + ($iSin * $iSinMulH))
    _VU_Meter()
    Sleep($iSleep)
    Next
    If Mod($iHeigth - $aWinPos[3], $iStep) Then
    If $iStepH < 0 Then
    $iStepH = -1
    Else
    $iStepH = 1
    EndIf
    For $i = $iLastI - 1 To $iHeigth Step $iStepH
    WinMove($hWnd, "", Default, Default, Default, $i)
    _VU_Meter()
    Next
    EndIf
    EndIf
    EndFunc
    #EndRegion#Funcs###################################################################################

    [/autoit]


    Nochmal für blinde: in dem spoiler ist der Source! X(


    Exe als Anhang.
    _______________________________
    Edit: Sogar ein Teil des Designs ist geklaut^^

    Dateien

    Desktop.rar 598,22 kB – 426 Downloads
  • m-obi wird 24!

    • Alizame
    • 9. Juni 2012 um 20:00

    Happy Birthday m-obi!

  • Web-Browser

    • Alizame
    • 9. Juni 2012 um 08:56

    naja es ist mal wieder nur eingebetteter IE, aber sonst ganz i.o. ;)
    (oh oh, ich könnte mir vorstellen, dass hier wieder ne riesen diskussion zustande kommt)

  • MediaPlayer Programmierer gesucht!

    • Alizame
    • 8. Juni 2012 um 13:49

    kann dir mal meinen zeigen (achtung! quellcode angucken auf eigene gefahr!!wirklich sehr sehr alpha!):
    _____

    Edit: ganz vergessen zu sagen: da sind von sehr vielen leute codeteile/funktionen kopiert, von denen ich leider vergessen habe die namen aufzuschreiben, an alle die das betrifft meldet euch bitte D;
    _________
    Poste es gleich in Skripte!

  • FOR-Schleife in IF-Abfrage

    • Alizame
    • 3. Juni 2012 um 14:26

    ich denke mal er meinte damit, dass es in scite eingebaut schon debug funktionen gibt, sowie debug msgbox'en oder consolewrite's, wo man nur die variable markieren muss und dann auf diesen eintrag gehen muss und beim ausführen werden diese werte angezeigt , und jangxx diese auch benutzen sollte.
    ok es war vllt etwas schwierig rauszulesen, :wacko:

  • ISN AutoIt Studio

    • Alizame
    • 3. Juni 2012 um 12:39

    freu mich schon auf die neue version ;D

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™