SchimmelJoghurt Posted August 21, 2016 Posted August 21, 2016 Hello, after a lot of time i spent on this topic without any results, i just want to ask for help. My problem is very simple. I just want to open Window Media Player with a video and set it to fullscreen. My first attempt was: Spoiler $WMP = ObjCreate("WMPlayer.OCX") $WMP.OpenPlayer(@ScriptDir & "\Wildlife.wmv") $WMP.fullscreen = True It opens a player with the video, but doesn't set it to fullscreen. Excactly like in the next example: Spoiler $GUI = GUICreate("Media Player", 500, 200, 215, 10) $WMP = ObjCreate("WMPlayer.OCX") $Mediaplayer = GUICtrlCreateObj($WMP, 1, 1, 300, 100) With $WMP .URL = @ScriptDir & "\Wildlife.wmv" .windowlessVideo = False .enableContextMenu = True .enabled = True .uiMode = "full" .settings.autostart = True .settings.mute = False .settings.volume = 100 .settings.Balance = 0 .fullScreen = True EndWith GUISetState(@SW_SHOW, $GUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd I hope somebody can help me Thanks. Greetings
Moderators JLogan3o13 Posted August 21, 2016 Moderators Posted August 21, 2016 @SchimmelJoghurt what about just a shellexecute? ShellExecute("wmplayer.exe", "", "", Default, @SW_MAXIMIZE) You can then use ObjGet to get a ref to the WMPlayer object if you need to manipulate it further. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
PACaleala Posted August 22, 2016 Posted August 22, 2016 Your GUI is too small: After adding this at the top of your script #include <GUIConstantsEx.au3> I have changed the first line as below $GUI = GUICreate("Media Player", @DesktopWidth-50, @DesktopHeight-50,20,20) and it worked for me. Have fun !
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