Jump to content

Recommended Posts

Posted

$Object = ObjCreate( "WMPlayer.OCX" )

I have been trying to figure out what kind of functions and variables i can read from Windows Media Player. So far, i managed to find play, stop, pause and a way to toggle full screen on/off. Obviously, thats not much. I've trying to read duration, current location, sizes of the current video and such. I realize this question isn't directly related to AutoIt, but nonetheless i hope for some help.

Where can i find the variable/function documentation of WMP?

Please do not direct me by saying "MSDN" because its so sloppy and hard to find anything at all, believe me - i tried.

Thanks!

Posted

Hi,

search for WMMedia on this forum.

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Posted

Hi,

searching for WMMedia did some good. Found a nice library by CFire to learn and improve upon.

The only thing i still have a problem to figure out is to determine the current video height, width and zoom.

Any chance anyone would know this?

Thank you all.

Posted

; ==============================================================================
; Name              : _WMGetMediaHeight
; Syntax            : _WMGetMediaHeight()
; Description       : Gets the height of the current media in pixels
; ==============================================================================

Func _WMGetMediaHeight()
        
    If $pObject <> 0 Then
        Return $pObject.currentMedia.imageSourceHeight
    EndIf

EndFunc

; ==============================================================================
; Name              : _WMGetMediaWidth
; Syntax            : _WMGetMediaWidth()
; Description       : Gets the width of the current media in pixels
; ==============================================================================

Func _WMGetMediaWidth()
        
    If $pObject <> 0 Then
        Return $pObject.currentMedia.imageSourceWidth
    EndIf

EndFunc

Be sure to properly check if some media is loaded; otherwise critical error.

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
×
×
  • Create New...