#Include <DSEngine.au3>
$sFile = FileOpenDialog('Select Video File', @ScriptDir, 'Video Files (*.avi;*.mpg;*.wmv;*.mov;*.3gp;*.asf;*.mp4;*.flv;*.rv)')
If Not $sFile Then
Exit
EndIf
$hForm = GUICreate('MyGUI')
Engine_Startup(@ScriptDir & '\DSEngine_UDF.dll')
Engine_LoadFile($sFile, $hForm)
$aSize = Engine_GetVideoSize()
WinMove($hForm, '', (@DesktopWidth - $aSize[0]) / 2, (@DesktopHeight - $aSize[1]) / 2, $aSize[0], $aSize[1])
Engine_SetRects(0, 0, 0, 0, 0, 0, $aSize[0], $aSize[1])
GUISetState()
Engine_StartPlayback()
Do
Until GUIGetMsg() = -3
Engine_Shutdown()