Sign in to follow this  
Followers 0
ConsultingJoe

W M P Object video?

7 posts in this topic

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.asp

Here 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

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites



does anyone know about these objects, it would be very useful in guis


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

this will work :D

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

Share this post


Link to post
Share on other sites

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


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

the last one .Uimode='None'

you must specify the Uimode

None, mini, or full

Recards jpam

Share this post


Link to post
Share on other sites

the last one .Uimode='None'

you must specify the Uimode

None, mini, or full

Recards jpam

Awsome thanks alot, I am going to make a nice UDF with as many functions as possible

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

One more question. is there a way to set the visualizations?


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0