problem mit avi abspielen

  • hi,

    ich hab mir einerseits einen eigenen code zusammengebastelt und auf der anderen seite das fertige script von der hilfe datei verwendet. anbei der source code. jedoch bleibt das gui leider grau.

    Spoiler anzeigen
    [autoit]

    include <GuiConstantsEx.au3>
    #include <GuiAVI.au3>

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

    Opt('MustDeclareVars', 1)

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

    $Debug_AVI = False ; Check ClassName being passed to AVI functions, set to True and use a handle to another control to see it work

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

    Global $hAVI

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

    _Example1()

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

    Func _Example1()
    Local $hGUI, $sFile = "C:\Users\zeman\Desktop\rick.avi"

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

    ; Create GUI
    $hGUI = GUICreate("(External 1) AVI Create", 800, 600)
    $hAVI = _GUICtrlAVI_Create ($hGUI, $sFile, -1, 320, 240)
    GUISetState()

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

    GUIRegisterMsg($WM_COMMAND, "WM_COMMAND")

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

    ; Play the sample AutoIt AVI
    _GUICtrlAVI_Play ($hAVI)

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

    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

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

    ; Close AVI clip
    _GUICtrlAVI_Close ($hAVI)

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

    GUIDelete()
    EndFunc ;==>_Example1

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

    Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam)
    Local $hWndFrom, $iIDFrom, $iCode
    $hWndFrom = $ilParam
    $iIDFrom = BitAND($iwParam, 0xFFFF) ; Low Word
    $iCode = BitShift($iwParam, 16) ; Hi Word
    Switch $hWndFrom
    Case $hAVI
    Switch $iCode
    Case $ACN_START ; Notifies an animation control's parent window that the associated AVI clip has started playing
    _DebugPrint("$ACN_START" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    ; no return value
    Case $ACN_STOP ; Notifies the parent window of an animation control that the associated AVI clip has stopped playing
    _DebugPrint("$ACN_STOP" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    ; no return value
    EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_COMMAND

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

    Func _DebugPrint($s_text, $line = @ScriptLineNumber)
    ConsoleWrite( _
    "!===========================================================" & @LF & _
    "+======================================================" & @LF & _
    "-->Line(" & StringFormat("%04d", $line) & "):" & @TAB & $s_text & @LF & _
    "+======================================================" & @LF)
    EndFunc ;==>_DebugPrint

    [/autoit]

    Einmal editiert, zuletzt von hxhjx (8. Mai 2008 um 12:10)

  • Moin, ich habe es mal grade bei mir laufen lassen, ohne Probleme, ich habe mal die Clock.avi aus dem Windwos Ordner genommen (habe Wndows XP, keine Ahnung ob es die bei Vista auch noch gibt.)


    @WindowsDir & "\clock.avi" statt "C:\Users\zeman\Desktop\rick.avi" in Zeile 14

    Sollte das gehen, würde ich mal auf das Format / Codec von deinem rick.avi tippen.

    Mfg
    Jens (McPoldy)

    Twitter: jkroeger

    Denn die Dinge, die wir erst lernen müssen, bevor wir sie tun, lernen wir beim Tun.(Aristoteles)