hi,
will nicht drumrum reden kann man mit autoit filme abspielen ?
würde mich auf antwort freuen...
MFG
will nicht drumrum reden kann man mit autoit filme abspielen ?
würde mich auf antwort freuen...
MFG
$file = 'C:\Users\Public\Videos\Sample Videos\Wildlife.wmv'
GUICreate('blah', @DesktopWidth, @DesktopHeight, -3, 0)
GUISetState()
$obj = ObjCreate("WMPlayer.ocx")
GUICtrlCreateObj($obj, 0, 0, @DesktopWidth, @DesktopHeight)
With $obj
.URL = $file
.fullScreen = True
.windowlessVideo = False
.enableContextMenu = True
.enabled = True
.uiMode = "full"
.settings.autostart = True
.settings.mute = False
.settings.volume = 100
.settings.Balance = 0
EndWith
while 1
Switch GUIGetMsg()
Case -3
Exit
EndSwitch
WEnd
#include-once
#include <IE.au3>
#Region Header
#cs
Title: VLC UDF Library for AutoIt3
Filename: VLC.au3
Description: A collection of functions for creating and controlling a VLC control in AutoIT
Author: seangriffin
Version: V0.3
Last Update: 17/05/10
Requirements: AutoIt3 3.2 or higher,
A VLC version greater than 0.8.5 installed
Changelog:
--------17/05/10----------- v0.3
Added the function _GUICtrlVLC_GetVolume.
Added the function _GUICtrlVLC_SetVolume.
Added the function _GUICtrlVLC_GetMute.
Added the function _GUICtrlVLC_SetMute.
--------15/05/10----------- v0.2
Changed _GUICtrlVLC_GetState to return 0 if no playlist items.
Changed _GUICtrlVLC_Pause to return 0 if no playlist items.
Changed _GUICtrlVLC_Stop to return 0 if no playlist items.
Changed _GUICtrlVLC_SeekRelative to return 0 if no playlist items.
Changed _GUICtrlVLC_SeekAbsolute to return 0 if no playlist items.
Added error handling to all functions.
Added the function _VLCErrorHandlerRegister.
Added the function __VLCInternalErrorHandler.
---------08/05/10---------- v0.1
Initial release.
Note that a clipping problem currently exists in the VLC control.
#ce
#EndRegion Header
#Region Global Variables and Constants
Global $oVLCErrorHandler, $sVLCUserErrorHandler
#EndRegion Global Variables and Constants
#Region Core functions
; #FUNCTION# ;===============================================================================
;
; Name...........: _GUICtrlVLC_Create()
; Description ...: Creates a VLC control.
; Syntax.........: _GUICtrlVLC_Create($left, $top, $width, $height)
; Parameters ....: $left - The left side of the control.
; $top - The top of the control.
; $width - The width of the control
; $height - The height of the control
; Return values .: On Success - Returns the identifier (controlID) of the new control.
; On Failure - Returns False.
; Author ........: seangriffin
; Modified.......:
; Remarks .......: This function must be used before any other function in the UDF is used.
; There is currently a clipping problem with the control, where the video
; is overdrawn by any other window that overlaps it. There is no known
; solution at this time.
;
; Related .......:
; Link ..........:
; Example .......: Yes
;
; ;==========================================================================================
Func _GUICtrlVLC_Create($left, $top, $width, $height)
Local Const $html = _
"<style type=""text/css"">html, body, vlc {margin: 0px; padding: 0px; overflow: hidden;}</style>" & @CRLF & _
"<object classid=""clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921""" & @CRLF & _
"codebase=""http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab""" & @CRLF & _
"width=""" & $width & """ height=""" & $height & """" & @CRLF & _
"id=""vlc"" events=""True"">" & @CRLF & _
"</object>"
$oIE = _IECreateEmbedded ()
$oIEActiveX = GUICtrlCreateObj($oIE, $left, $top, $width-4, $height-4)
_IENavigate($oIE, "about:blank")
_IEDocWriteHTML($oIE, $html)
$vlc = _IEGetObjByName($oIE, "vlc")
; Clear any current VLC errors
$oVLCErrorHandler.WinDescription = ""
; Check VLC version info. as a means to determine if the Active X control is installed
$vlc.versionInfo()
; If an error (the ActiveX control is not installed), then return False
if StringInStr($oVLCErrorHandler.WinDescription, "Unknown name") > 0 Then
GUICtrlDelete($oIEActiveX)
_IEQuit($oIE)
Return False
EndIf
Return $vlc
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _GUICtrlVLC_Add
; Description ...: Adds a video to the playlist of a VLC control.
; Syntax.........: _GUICtrlVLC_Add($vlc, $path)
; Parameters ....: $vlc - The control identifier (controlID) as returned by _GUICtrlVLC_Create.
; $path - The full path, including filename, of the video to add.
; Return values .: On Success - Returns a number as an item identifier in playlist.
; On Failure - Returns False.
; Author ........: seangriffin
; Modified.......:
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: Yes
;
; ;==========================================================================================
Func _GUICtrlVLC_Add($vlc, $path)
if IsObj($vlc) = False Then Return False
Return $vlc.playlist.add("file:///" & $path)
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _GUICtrlVLC_Play
; Description ...: Plays a video in the playlist of a VLC control.
; Syntax.........: _GUICtrlVLC_Play($vlc, $item)
; Parameters ....: $vlc - The control identifier (controlID) as returned by _GUICtrlVLC_Create.
; $item - The item in playlist to play, as returned by _GUICtrlVLC_Add.
; Return values .: On Success - Returns True.
; On Failure - Returns False.
; Author ........: seangriffin
; Modified.......:
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: Yes
;
; ;==========================================================================================
Func _GUICtrlVLC_Play($vlc, $item)
if IsObj($vlc) = False Then Return False
$vlc.playlist.playItem($item)
Return True
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _GUICtrlVLC_Pause
; Description ...: Pauses and unpauses the playing video.
; Syntax.........: _GUICtrlVLC_Pause($vlc)
; Parameters ....: $vlc - The control identifier (controlID) as returned by _GUICtrlVLC_Create.
; Return values .: On Success - Returns True.
; On Failure - Returns False.
; Author ........: seangriffin
; Modified.......:
; Remarks .......: Each time this function is called, the paused state of the video is toggled.
; Related .......:
; Link ..........:
; Example .......: Yes
;
; ;==========================================================================================
Func _GUICtrlVLC_Pause($vlc)
if IsObj($vlc) = False Then Return False
if $vlc.playlist.items.count = 0 Then
Return 0
Else
$vlc.playlist.togglePause()
EndIf
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _GUICtrlVLC_Stop
; Description ...: Stops the playing video.
; Syntax.........: _GUICtrlVLC_Stop($vlc)
; Parameters ....: $vlc - The control identifier (controlID) as returned by _GUICtrlVLC_Create.
; Return values .: On Success - Returns True.
; On Failure - Returns False.
; Author ........: seangriffin
; Modified.......:
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: Yes
;
; ;==========================================================================================
Func _GUICtrlVLC_Stop($vlc)
if IsObj($vlc) = False Then Return False
if $vlc.playlist.items.count = 0 Then
Return 0
Else
$vlc.playlist.stop()
EndIf
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _GUICtrlVLC_Clear
; Description ...: Clears the playlist of a VLC control (removes all videos).
; Syntax.........: _GUICtrlVLC_Clear($vlc)
; Parameters ....: $vlc - The control identifier (controlID) as returned by _GUICtrlVLC_Create.
; Return values .: On Success - Returns True.
; On Failure - Returns False.
; Author ........: seangriffin
; Modified.......:
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: Yes
;
; ;==========================================================================================
Func _GUICtrlVLC_Clear($vlc)
if IsObj($vlc) = False Then Return False
$vlc.playlist.items.clear()
while $vlc.playlist.items.count > 0
WEnd
Sleep(250)
Return True
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _GUICtrlVLC_SeekRelative
; Description ...: Seek a relative number of milliseconds through the playing video.
; Syntax.........: _GUICtrlVLC_SeekRelative($vlc, $time)
; Parameters ....: $vlc - The control identifier (controlID) as returned by _GUICtrlVLC_Create.
; $time - A number of milliseconds to seek (negative values seek backwards).
; Return values .: On Success - Returns True.
; On Failure - Returns False.
; Author ........: seangriffin
; Modified.......:
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: Yes
;
; ;==========================================================================================
Func _GUICtrlVLC_SeekRelative($vlc, $time)
if IsObj($vlc) = False Then Return False
if $vlc.playlist.items.count = 0 Then
Return 0
Else
$vlc.input.time = $vlc.input.time + $time
EndIf
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _GUICtrlVLC_SeekAbsolute
; Description ...: Seek to an absolute location in time in the playing video.
; Syntax.........: _GUICtrlVLC_SeekAbsolute($vlc, $time)
; Parameters ....: $vlc - The control identifier (controlID) as returned by _GUICtrlVLC_Create.
; $time - The number of milliseconds from the start of the video to seek to.
; Return values .: On Success - Returns True.
; On Failure - Returns False.
; Author ........: seangriffin
; Modified.......:
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: Yes
;
; ;==========================================================================================
Func _GUICtrlVLC_SeekAbsolute($vlc, $time)
if IsObj($vlc) = False Then Return False
if $vlc.playlist.items.count = 0 Then
Return 0
Else
$vlc.input.time = $time
EndIf
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _GUICtrlVLC_GetState
; Description ...: Get the current state of the playing video.
; Syntax.........: _GUICtrlVLC_GetState($vlc)
; Parameters ....: $vlc - The control identifier (controlID) as returned by _GUICtrlVLC_Create.
; Return values .: On Success - Returns a number representing the state of the video:
; (IDLE=0, OPENING=1, BUFFERING=2, PLAYING=3, PAUSED=4, STOPPING=5, ENDED=6, ERROR=7)
; On Failure - Returns 0.
; Author ........: seangriffin
; Modified.......:
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: Yes
;
; ;==========================================================================================
Func _GUICtrlVLC_GetState($vlc)
if IsObj($vlc) = False Then Return False
if $vlc.playlist.items.count = 0 Then
Return 0
Else
Return $vlc.input.state
EndIf
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _GUICtrlVLC_GetLength
; Description ...: Get the length of the playing video.
; Syntax.........: _GUICtrlVLC_GetLength($vlc)
; Parameters ....: $vlc - The control identifier (controlID) as returned by _GUICtrlVLC_Create.
; Return values .: On Success - Returns the length of the video in milliseconds.
; On Failure - Returns False.
; Author ........: seangriffin
; Modified.......:
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: Yes
;
; ;==========================================================================================
Func _GUICtrlVLC_GetLength($vlc)
if IsObj($vlc) = False Then Return False
Return $vlc.input.length
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _GUICtrlVLC_GetMute
; Description ...: Gets the mute setting of the playing video.
; Syntax.........: _GUICtrlVLC_GetMute($vlc)
; Parameters ....: $vlc - The control identifier (controlID) as returned by _GUICtrlVLC_Create.
; Return values .: If muted - Returns True.
; If not muted - Returns False.
; Author ........: seangriffin
; Modified.......:
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: Yes
;
; ;==========================================================================================
Func _GUICtrlVLC_GetMute($vlc)
if IsObj($vlc) = False Then Return False
Return $vlc.audio.mute
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _GUICtrlVLC_GetTime
; Description ...: Get the absolute position of the playing video.
; Syntax.........: _GUICtrlVLC_GetTime($vlc)
; Parameters ....: $vlc - The control identifier (controlID) as returned by _GUICtrlVLC_Create.
; Return values .: On Success - Returns the position of the playing video in milliseconds.
; On Failure - Returns False.
; Author ........: seangriffin
; Modified.......:
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: Yes
;
; ;==========================================================================================
Func _GUICtrlVLC_GetTime($vlc)
if IsObj($vlc) = False Then Return False
Return $vlc.input.time
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _GUICtrlVLC_GetVolume
; Description ...: Gets the volume of the playing video.
; Syntax.........: _GUICtrlVLC_GetVolume($vlc)
; Parameters ....: $vlc - The control identifier (controlID) as returned by _GUICtrlVLC_Create.
; Return values .: On Success - Returns the percentage of the volume [0-200].
; On Failure - Returns False.
; Author ........: seangriffin
; Modified.......:
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: Yes
;
; ;==========================================================================================
Func _GUICtrlVLC_GetVolume($vlc)
if IsObj($vlc) = False Then Return False
Return $vlc.audio.volume
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _GUICtrlVLC_SetMute
; Description ...: Mutes and unmutes the volume of the playing video.
; Syntax.........: _GUICtrlVLC_SetMute($vlc, $toggle)
; Parameters ....: $vlc - The control identifier (controlID) as returned by _GUICtrlVLC_Create.
; $toggle - boolean value to mute and ummute the audio.
; Return values .: On Success - Returns True.
; On Failure - Returns False.
; Author ........: seangriffin
; Modified.......:
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: Yes
;
; ;==========================================================================================
Func _GUICtrlVLC_SetMute($vlc, $toggle)
if IsObj($vlc) = False Then Return False
$vlc.audio.mute = $toggle
Return True
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _GUICtrlVLC_SetVolume
; Description ...: Sets the volume of the playing video.
; Syntax.........: _GUICtrlVLC_SetVolume($vlc, $level)
; Parameters ....: $vlc - The control identifier (controlID) as returned by _GUICtrlVLC_Create.
; $level - a value between [0-200] which indicates a percentage of the volume.
; Return values .: On Success - Returns True.
; On Failure - Returns False.
; Author ........: seangriffin
; Modified.......:
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: Yes
;
; ;==========================================================================================
Func _GUICtrlVLC_SetVolume($vlc, $level)
if IsObj($vlc) = False Then Return False
$vlc.audio.volume = $level
Return True
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _VLCErrorHandlerRegister()
; Description ...: Register and enable a VLC ActiveX error handler.
; Syntax.........: _VLCErrorHandlerRegister($s_functionName = "__VLCInternalErrorHandler")
; Parameters ....: $s_functionName - The name of the AutoIT function to run if an error occurs.
; Return values .: On Success - Returns 1
; On Failure - Returns 0
; Author ........: seangriffin
; Modified.......:
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: Yes
;
; ;==========================================================================================
Func _VLCErrorHandlerRegister($s_functionName = "__VLCInternalErrorHandler")
_IEErrorNotify(false)
$sVLCUserErrorHandler = $s_functionName
$oVLCErrorHandler = ""
$oVLCErrorHandler = ObjEvent("AutoIt.Error", $s_functionName)
If IsObj($oVLCErrorHandler) Then
SetError(0)
Return 1
Else
SetError(0, 1)
Return 0
EndIf
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: __VLCInternalErrorHandler()
; Description ...: A VLC ActiveX error handler.
; Syntax.........: __VLCInternalErrorHandler()
; Parameters ....:
; Return values .: On Success - Returns 1
; On Failure - Returns 0
; Author ........: seangriffin
; Modified.......:
; Remarks .......: Doesn't do anything really, except catch and set the error values in
; $oVLCErrorHandler. $oVLCErrorHandler is global, and can be utilised
; in the calling script instead.
; Related .......:
; Link ..........:
; Example .......: Yes
;
; ;==========================================================================================
Func __VLCInternalErrorHandler()
; if StringInStr($oVLCErrorHandler.WinDescription, "Unknown name") > 0 Then
; ConsoleWrite("--> COM / ActiveX Error Encountered in " & @ScriptName & @CRLF & _
; "----> Unknown Active X object. VLC is most likely not installed)." & @CRLF & _
; " Please reinstall VLC Player and try again" & @CRLF)
; SetError(1)
; EndIf
Return
EndFunc
#include <GUIConstants.au3>
#include <VLC.au3>
#include <SliderConstants.au3>
#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GuiSlider.au3>
Const $ini_filename = @ScriptDir & "\VLC UDF Example.ini"
Dim $msg, $state = 0
Global $position_slider_drag = False, $vlc1, $position_slider, $user_stop = False, $main_gui, $video_path_input
_VLCErrorHandlerRegister()
; Setup Main GUI
$main_gui = GUICreate("VLC UDF Example", 800, 600, -1, -1)
GUICtrlCreateLabel("Video Path", 10, 10, 60, 20)
$video_path_input = GUICtrlCreateInput(IniRead($ini_filename, "Main", "videopath", ""), 70, 10, 600, 20)
$video_path_button = GUICtrlCreateButton("Select (Insert)", 700, 10, 80, 20)
$vlc1 = _GUICtrlVLC_Create(0, 50, 800, 450)
if $vlc1 = False then
msgbox(0, "VLC UDF Example", "_GUICtrlVLC_Create failed." & @CRLF & _
"The most likely cause is that you don't have VLC installed." & @CRLF & _
"Make sure VLC, and the ActiveX component, is installed.")
Exit
EndIf
$position_slider = GUICtrlCreateSlider(0, 500, 800, 30, $TBS_NOTICKS)
$backward_button = GUICtrlCreateButton("Rewind (Arrow Left)", 10, 535, 120, 20)
GUICtrlSetState($backward_button, $GUI_DISABLE)
$pause_button = GUICtrlCreateButton("Pause (Space)", 160, 535, 80, 20)
GUICtrlSetState($pause_button, $GUI_DISABLE)
$stop_button = GUICtrlCreateButton("Stop", 280, 535, 80, 20)
GUICtrlSetState($stop_button, $GUI_DISABLE)
$play_button = GUICtrlCreateButton("Play", 415, 535, 80, 20)
GUICtrlSetState($play_button, $GUI_DISABLE)
$close_button = GUICtrlCreateButton("Close (Esc)", 550, 535, 80, 20)
$forward_button = GUICtrlCreateButton("FForward (Arrow Right)", 670, 535, 120, 20)
GUICtrlSetState($forward_button, $GUI_DISABLE)
GUICtrlCreateLabel("Video Status", 10, 565, 80, 20)
$status_input = GUICtrlCreateInput("", 75, 565, 20, 20)
GUICtrlCreateLabel("Volume (F6 && F7)", 310, 565, 80, 20)
$volume_slider = GUICtrlCreateSlider(390, 560, 250, 30)
GUICtrlSetLimit($volume_slider, 200)
GUICtrlSetData($volume_slider, _GUICtrlVLC_GetVolume($vlc1))
$volume_up = GUICtrlCreateDummy()
$volume_down = GUICtrlCreateDummy()
$mute_button = GUICtrlCreateButton("Mute (F8)", 670, 565, 120, 20)
dim $main_gui_accel[8][2]=[["{ESC}", $close_button], ["{RIGHT}", $forward_button], ["{LEFT}", $backward_button], [" ", $pause_button], ["{INSERT}", $video_path_button], ["{F6}", $volume_down], ["{F7}", $volume_up], ["{F8}", $mute_button]]
; Show Main GUI
GUISetState(@SW_SHOW)
GUISetAccelerators($main_gui_accel)
; Load last video played
if StringLen(GUICtrlRead($video_path_input)) > 0 Then UpdateGUIAndPlay(GUICtrlRead($video_path_input))
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
if StringLen(GUICtrlRead($video_path_input)) > 0 Then $state = _GUICtrlVLC_GetState($vlc1)
if $state = 3 Then GUICtrlSetState($play_button, $GUI_DISABLE)
; Main Loop
while 1
; Get the video state
if StringLen(GUICtrlRead($video_path_input)) > 0 Then
$state = _GUICtrlVLC_GetState($vlc1)
GUICtrlSetData($status_input, $state)
EndIf
; Loop a finished video
if $state = 6 and $user_stop = False Then UpdateGUIAndPlay()
; Update the video position slider
if ($state = 3 or $state = 4) and $position_slider_drag = False Then
GUICtrlSetData($position_slider, (_GUICtrlVLC_GetTime($vlc1) / 1000))
$position_slider_drag = False
EndIf
if $msg = $volume_slider Then
_GUICtrlVLC_SetVolume($vlc1, GUICtrlRead($volume_slider))
EndIf
if $msg = $volume_down Then
$new_vol = _GUICtrlVLC_GetVolume($vlc1) - 10
if $new_vol < 0 then $new_vol = 0
_GUICtrlVLC_SetVolume($vlc1, $new_vol)
GUICtrlSetData($volume_slider, $new_vol)
EndIf
if $msg = $volume_up Then
$new_vol = _GUICtrlVLC_GetVolume($vlc1) + 10
if $new_vol > 200 then $new_vol = 200
_GUICtrlVLC_SetVolume($vlc1, $new_vol)
GUICtrlSetData($volume_slider, $new_vol)
EndIf
if $msg = $mute_button Then
if _GUICtrlVLC_GetMute($vlc1) = True Then
_GUICtrlVLC_SetMute($vlc1, False)
Else
_GUICtrlVLC_SetMute($vlc1, True)
EndIf
EndIf
if $msg = $video_path_button Then
$video_path = FileOpenDialog("VLC UDF Example - Select Video", "C:\", "Videos (*.avi;*.flv;*.mp4)", 3)
if StringLen($video_path) > 0 Then UpdateGUIAndPlay($video_path)
EndIf
if $msg = $forward_button Then
_GUICtrlVLC_SeekRelative($vlc1, 5000)
EndIf
If $msg = $backward_button Then
_GUICtrlVLC_SeekRelative($vlc1, -5000)
EndIf
if $msg = $pause_button Then
_GUICtrlVLC_Pause($vlc1)
EndIf
if $msg = $stop_button Then
_GUICtrlVLC_Stop($vlc1)
$user_stop = True
GUICtrlSetState($backward_button, $GUI_DISABLE)
GUICtrlSetState($forward_button, $GUI_DISABLE)
GUICtrlSetState($pause_button, $GUI_DISABLE)
GUICtrlSetState($stop_button, $GUI_DISABLE)
GUICtrlSetState($play_button, $GUI_ENABLE)
EndIf
if $msg = $play_button Then
$user_stop = False
$vlc1.playlist.play()
GUICtrlSetState($backward_button, $GUI_ENABLE)
GUICtrlSetState($forward_button, $GUI_ENABLE)
GUICtrlSetState($pause_button, $GUI_ENABLE)
GUICtrlSetState($stop_button, $GUI_ENABLE)
GUICtrlSetState($play_button, $GUI_DISABLE)
EndIf
If $msg = $GUI_EVENT_CLOSE or $msg = $close_button Then
IniWrite($ini_filename, "Main", "videopath", GUICtrlRead($video_path_input))
ExitLoop
EndIf
$msg = GUIGetMsg()
WEnd
Func UpdateGUIAndPlay($path = "")
GUICtrlSetState($play_button, $GUI_DISABLE)
if StringLen($path) > 0 Then
GUICtrlSetData($video_path_input, $path)
_GUICtrlVLC_Clear($vlc1)
_GUICtrlVLC_Play($vlc1, _GUICtrlVLC_Add($vlc1, GUICtrlRead($video_path_input)))
Else
_GUICtrlVLC_Play($vlc1, 0)
EndIf
While _GUICtrlVLC_GetState($vlc1) <> 3
WEnd
GUICtrlSetLimit($position_slider, (_GUICtrlVLC_GetLength($vlc1) / 1000))
GUICtrlSetData($position_slider, 0)
$position_slider_drag = False
GUICtrlSetState($backward_button, $GUI_ENABLE)
GUICtrlSetState($forward_button, $GUI_ENABLE)
GUICtrlSetState($pause_button, $GUI_ENABLE)
GUICtrlSetState($stop_button, $GUI_ENABLE)
GUICtrlSetState($play_button, $GUI_DISABLE)
EndFunc
Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
#forceref $hWnd, $iMsg, $iwParam
Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndSlider
$hWndSlider = $position_slider
If Not IsHWnd($position_slider) Then $hWndSlider = GUICtrlGetHandle($position_slider)
$tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
$hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
$iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
$iCode = DllStructGetData($tNMHDR, "Code")
Switch $hWndFrom
Case $hWndSlider
Switch $iCode
case $NM_CUSTOMDRAW
$position_slider_drag = True
Case $NM_RELEASEDCAPTURE
_GUICtrlVLC_SeekAbsolute($vlc1, (GUICtrlRead($position_slider) * 1000))
$position_slider_drag = False
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc
#include <vlc.au3>
_VLCErrorHandlerRegister()
$gut=GUICreate("Film",506, 404, 323, 165)
$vlc1 = _GUICtrlVLC_Create(0, 0, 506, 404)
GUISetState()
_GUICtrlVLC_Play($vlc1, _GUICtrlVLC_Add($vlc1, "Pfad zu mp4/avi Datei"))
While 1
WEnd