![]() The VLC Player creates some kind of own GUI and Control when calling the Object. The only way to get it run without crashing is NOT to use the "GUICtrlCreateObj". helpcontext _ ) SetError ( 1 ) to check for after this function returns Endfunc helpfile & & _ "err.helpcontext is: " & & $oMyError. ![]() source & & _ "err.helpfile is: " & & $oMyError. scriptline & & _ "err.source is: " & & $oMyError. lastdllerror & & _ "err.scriptline is: " & & $oMyError. windescription & & _ "err.number is: " & & $HexNumber & & _ "err.lastdllerror is: " & & $oMyError. description & & _ "err.windescription:" & & $oMyError. number, 8 ) Msgbox ( 0, "AutoItCOM Test", "We intercepted a COM Error !" & & & _ "err.description is: " & & $oMyError. Volume = 50 EndWith EndFunc Func GUIeventClose ( ) Exit EndFunc =>GUIeventClose This is custom error handler Func MyErrFunc ( ) $HexNumber = hex ( $oMyError. AddTarget ($hFile, Default, $VLCPlayListInsert, 0). " ) Return Else Sleep ( 100 ) _StartPlay ( $File ) EndIf EndFunc Func _StartPlay ( $hFile ) With $oVLC. ", 10, 20, 70 ) GUICtrlSetOnEvent ( - 1, "_SelectFile" ) $oVLC_Object = GUICtrlCreateObj ($hGui, 10, 70, 700, 460) GUICtrlSetStyle ( $oVLC_Object, $WS_VISIBLE ) GUICtrlSetResizing ($oVLC_Object,$GUI_DOCKAUTO) $GUI_DOCKAUTO Auto Resize Object GuiSetState ( ) $size = WinGetPos ( "" ) While 1 Sleep ( 100 ) WEnd Func _SelectFile ( ) $File = FileOpenDialog ( "Select a movie File ", & "", "Images (*.flv *.swf *.wmv *.avi *.*)", 1 ) If Then MsgBox ( 4096, "", "No File chosen. Expand collapse popup opt ( "GUIOnEventMode", 1 ) #include #include #include VLCPlaylistMode Const $VLCPlayListInsert = 1 Const $VLCPlayListReplace = 2 Const $VLCPlayListAppend = 4 Const $VLCPlayListGo = 8 Const $VLCPlayListInsertAndGo = 9 Const $VLCPlayListReplaceAndGo = 10 Const $VLCPlayListAppendAndGo = 12 Const $VLCPlayListCheckInsert = 16 Initialize error handler $oMyError = ObjEvent ( "AutoIt.Error", "MyErrFunc" ) - Declare objects - $oVLC = ObjCreate ( "VideoLAN.VLCPlugin.1" ) - Main Gui - $hGui = GuiCreate ( "VLC Viewer", 500, 390 ,- 1, - 1, Bitor ( $WS_OVERLAPPEDWINDOW, $WS_VISIBLE, $WS_CLIPSIBLINGS ) ) GUISetOnEvent ( $GUI_EVENT_CLOSE, "GUIeventClose" ) $bSelect = GUICtrlCreateButton ( "Select.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |