Jump to content

Search the Community

Showing results for tags 'wmplayer.ocx;'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hi all I have the commission to create a small program in AutoIt. Among other things, this script should be able to run movies in a GUI. This is not a problem. I decided to take the ActiveX Object from the Windows Media Player to play movies in my GUI. This because the Media Player is installed on all of our computers. My short test-script (see below) is working nearly perfect, but I can't resize the movie during playing! How can I achieve that I can resize the GUI during running the movie and the movie is also resizing? GUICtrlSetResizing doesn't helpDeleting the ActiveX Object and the WMPlayer.ocx Object in the _Resize Function and recreate it with the new size doesn't work! (Why? Is this a bug?)I didn't found any properties to set the width or height! (http://msdn.microsoft.com/en-us/library/dd563945(v=vs.85).aspx)How can I do this?Or can I embed the Media Player in an other way, to use this functionality? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) Global $hGUI1, $oWMP1, $hWMP1, $sURL $sURL = FileOpenDialog("Please choose a movie", @HomeDrive, "Movies (*.mpg;*.mpeg;*.mp4; *.avi)", 1) If @error Or Not $sURL Then _Exit() $hGUI1 = GUICreate("Test", 300, 200, -1, -1, $WS_SIZEBOX) GUISetState(@SW_SHOW) GUISetOnEvent($GUI_EVENT_RESIZED, "_Resize") GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $oWMP1 = ObjCreate("WMPlayer.OCX") If Not IsObj($oWMP1) Then Exit $hWMP1 = GUICtrlCreateObj($oWMP1, 0, 0, 300, 200) GUICtrlSetResizing($hWMP1, $GUI_DOCKBORDERS) With $oWMP1 .URL = $sURL Local $iEmergencyTimer = TimerInit() While .playState() = 9 ;Wait while playState = Transitioning (Preparing new media item) If TimerDiff($iEmergencyTimer) > 2000 Then ExitLoop Sleep(50) WEnd .settings.autoStart = False .controls.stop() ;Stop, to ensure, that they are at the beginning! .fullscreen = False .stretchToFit = True .settings.setMode('loop', True) .settings.playCount = 1000000 .settings.rate = 1 .uiMode = 'none' .settings.volume = 100 .settings.mute = False .enableContextMenu = True .controls.play() EndWith While True Sleep(10) WEnd Exit Func _Resize() Local $aSize = WinGetPos($hGUI1) ConsoleWrite("Resize: " & GUICtrlSetPos($hWMP1, 0, 0, $aSize[2], $aSize[3]) & @CRLF) EndFunc ;==>_Resize Func _Exit() Exit EndFunc ;==>_Exit Many thanks, Veronesi
×
×
  • Create New...