Jump to content

Recommended Posts

  • Replies 53
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted

I found a script what is working with repeating video. And it plays mp4. The only problem is, that it works with fileopen command. Is it possible to modify it, so it plays a video from " Local $sfldr1 "?

 

 

Posted

@Belini You did it. This one is working with video on my Windows 10 computer. Thank you very much. Please take a look at de final script i would like to use. It is for installing installations. But I am going to play with your latest script now and will let you know tomorow if I could manage it to make a complete good script that I want to use

Thank you very much. You are super.

Posted (edited)

Please refer to my zPlayer for full implementation of a media player.
 

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

HotKeySet("{esc}", "quit")

Global $videoWidth = 600, $videoHeight = 200
Global $videoGUI = GUICreate("Example", $videoWidth, $videoHeight, -1, -1, $WS_CLIPCHILDREN)
Global $oIE = CreateWMPlayer()
GUISetState (@SW_SHOW, $videoGUI)
Global $oPlayer = _IEGetObjById($oIE, "objWMPlayer")
Global $videoFile = "Put the full path of your video file here"
$oPlayer.URL = $videoFile

While 1
    If $oPlayer.playState <> 3 Then
        $oPlayer.Controls.Play
    EndIf
    Sleep(5)
WEnd

Func quit()
    $oPlayer.Controls.Stop
    Exit
EndFunc

Func CreateWMPlayer()
    Local $myIE_Obj = _IECreateEmbedded ()
    $IEControl = GUICtrlCreateObj($myIE_Obj, 0, 0, $videoWidth, $videoHeight)
    GUICtrlSetResizing($IEControl, 1)
    _IENavigate($myIE_Obj, "about:blank")
    Local $htmlWMP = '' _
        & @CR & '<body style="margin:0; padding:0">' _
        & @CR & '<OBJECT' _
        & @CR & 'ID="objWMPlayer"' _
        & @CR & 'WIDTH="' & $videoWidth & '"' _
        & @CR & 'HEIGHT="' & $videoHeight & '"' _
        & @CR & 'CLASSID="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"' _
        & @CR & 'TYPE="application/x-ms-wmp">' _
        & @CR & '<PARAM NAME="enableContextMenu" VALUE="true">' _
        & @CR & '<PARAM NAME="enableFullScreenControls" VALUE="true">' _
        & @CR & '<PARAM NAME="stretchToFit" VALUE="true">' _
        & @CR & '<PARAM NAME="uiMode" VALUE="none">' _
        & @CR & '</OBJECT>' _
        & @CR & '</body>'
    _IEDocWriteHTML ($myIE_Obj, $htmlWMP)
    ; Change uiMode value to "full" if you want to show contorls in video window
    _IEAction ($myIE_Obj, "refresh")
    $myIE_Obj.document.body.scroll = "no"
    $myIE_Obj.document.body.style.borderColor = "#000000"
    Return $myIE_Obj
EndFunc

 

Edited by CYCho
Posted

@Cycho. Thanks for your advice. I am going to take a look at your player too. @Belini did a great job for me already. Now I need to build the final script I needed.

Posted (edited)

@Belini and @NineI have compiled a working script.

I learned a lot from your script and with some strugling and comparing with other scripts, I finaly fixed it to make a good working script.

It is exactly as I wanted it, with repeating in it. It only need the "wmp.au3" attached in same scriptdirectory. See my attachment.

Thank you very much for your help. I really apreciate it. 

 

You can test my files with the mp4 file that I had attached in my first post. No need to install extra codecs for it. Works with Windows 10.

wmp.au3Fetching info...

Total working script mp4 Forum.au3Fetching info...

Edited by Kajoe
Posted

@Kajoe it's good to know it worked out as you wanted :)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...