ConsultingJoe Posted June 6, 2006 Posted June 6, 2006 I want to make a UDF from the wmp object but for some reason it wont play videos, videos work in the regular app but not in the gui, sound works though???here is the api site:http://msdn.microsoft.com/library/default....olreference.aspHere is my script (replace "VIDEO FILE" with a video):#include <GUIConstants.au3> ; == GUI generated with Koda == $Form1 = GUICreate("AForm1", 622, 448, 192, 125) $play = GUICtrlCreateButton( "PLAY", 0, 300 ) $stop = GUICtrlCreateButton( "STOP", 100, 300 ) $pause = GUICtrlCreateButton( "Pause", 200, 300 ) $oWMP = ObjCreate("WMPlayer.OCX.7") GUICtrlCreateObj($oWMP, 0, 0, 300, 300) $oWMP.URL = "VIDEO FILE" $oWMP.controls.play() $oWMP.stretchToFit = True GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $pause $oWMP.controls.pause() Case $msg = $play $oWMP.controls.play() Case $msg = $stop $oWMP.controls.stop() Case Else ;;;;;;; EndSelect WEnd Exit Check out ConsultingJoe.com
ConsultingJoe Posted June 6, 2006 Author Posted June 6, 2006 does anyone know about these objects, it would be very useful in guis Check out ConsultingJoe.com
jpam Posted June 6, 2006 Posted June 6, 2006 this will work Recards jpam #include <GUIConstants.au3> ; == GUI generated with Koda == $Form1 = GUICreate("AForm1", 622, 448, 192, 125) $play = GUICtrlCreateButton( "PLAY", 0, 300 ) $stop = GUICtrlCreateButton( "STOP", 100, 300 ) $pause = GUICtrlCreateButton( "Pause", 200, 300 ) $oWMP = ObjCreate("WMPlayer.OCX") GUICtrlCreateObj($oWMP, 0, 0, 300, 300) $oWMP.URL = "videofile" With $oWMP .controls.play() .stretchToFit = True .windowlessVideo = True .fullscreen = False .uiMode = 'None' EndWith GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $pause $oWMP.controls.pause() Case $msg = $play $oWMP.controls.play() Case $msg = $stop $oWMP.controls.stop() Case Else ;;;;;;; EndSelect WEnd Exit
ConsultingJoe Posted June 6, 2006 Author Posted June 6, 2006 Thanks a lot, can you tell me which one did fixed it? With $oWMP .controls.play() .stretchToFit = True .windowlessVideo = True .fullscreen = False .uiMode = 'None' EndWith Check out ConsultingJoe.com
jpam Posted June 7, 2006 Posted June 7, 2006 the last one .Uimode='None' you must specify the Uimode None, mini, or full Recards jpam
ConsultingJoe Posted June 7, 2006 Author Posted June 7, 2006 the last one .Uimode='None'you must specify the UimodeNone, mini, or fullRecards jpamAwsome thanks alot, I am going to make a nice UDF with as many functions as possible Check out ConsultingJoe.com
ConsultingJoe Posted June 7, 2006 Author Posted June 7, 2006 One more question. is there a way to set the visualizations? Check out ConsultingJoe.com
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now