SpRaY Posted March 28, 2007 Share Posted March 28, 2007 Hi, is it possible to force WMP inside application to resize? Like in flash its .ScaleMode Link to comment Share on other sites More sharing options...
Valuater Posted March 28, 2007 Share Posted March 28, 2007 Dunno... but this works great!! expandcollapse popup; Script Start - Add your code below here #include <GuiConstants.au3> Opt("WinTitleMatchMode",2) Opt("OnExitFunc","_exit") Opt("GuiOnEventMode",1) Global $mystatus = "Paused" Global $pause = 0 Global $wintitle = "none" $GUI = GuiCreate("VideoPlayer",400,35,350,300,-1) $PLAY = GUICtrlCreateButton("Play",41,2,40,30) $PAUSEBUT = GUICtrlCreateButton("Pause",82,2,40,30) $STOP = GUICtrlCreateButton("Stop",123,2,40,30) $LOAD = GUICtrlCreateButton("Load",164,2,40,30) $STATUS = GUICtrlCreateLabel("Status: "&$mystatus&@CRLF,206,0,-1,30) GuiSetState() GUISetOnEvent($GUI_EVENT_CLOSE,"_Exit") GUISetOnEvent($GUI_EVENT_MINIMIZE,"_Minimize") GUISetOnEvent($GUI_EVENT_RESTORE,"_Restore") GuiCtrlSetOnEvent($PLAY,"_Play") GuiCtrlSetOnEvent($STOP,"_Stop") GuiCtrlSetOnEvent($LOAD,"_Load") GuiCtrlSetOnEvent($PAUSEBUT,"_Pause") HotKeySet("^{DEL}","_Exit") While 1 $stateplayer = WinGetState("VideoPlayer", "") if BitAnd($stateplayer ,8) Then $statemovie = WinGetState("VideoMovie", "") If BitAnd($statemovie, 16) Then WinSetState("VideoMovie","",@SW_RESTORE) EndIf EndIf sleep(50) Wend Func mciSendString($string) Local $ret $ret = DllCall("winmm.dll","int","mciSendString","str",$string,"str","","int",65534,"hwnd",0) If Not @error Then Return $ret[2] EndFunc Func _Exit() mciSendString("Close myvideo") Exit EndFunc Func _Play() $pause = 0 mciSendString("play myvideo repeat") $mystatus = "PLAYING" Guictrlsetdata($STATUS,"Status: "&$mystatus&@CRLF) WinSetTitle($wintitle,"","VideoMovie") EndFunc Func _Stop() mciSendString("Stop myvideo") mciSendString("seek myvideo to start") $mystatus = "STOPPED" Guictrlsetdata($STATUS,"Status: "&$mystatus&@CRLF) EndFunc Func _Load() mciSendString("Close myvideo") $file = FileOpenDialog("OPEN","","Video (*.mp3;*.avi;*.mpg)") $wintitle = stringsplit($file,"\") $wintitle = $wintitle[$wintitle[0]] $file = '"'&$file&'"' mciSendString("open "&$file&" alias myvideo") _Play() EndFunc Func _Pause() If $pause = 0 Then mciSendString("stop myvideo") $mystatus = "PAUSED" Guictrlsetdata($STATUS,"Status: "&$mystatus&@CRLF) $pause = 1 Else _Play() EndIf EndFunc Func _Minimize() WinSetState("VideoMovie","",@SW_MINIMIZE) EndFunc Func _Restore() WinSetState("VideoMovie","",@SW_RESTORE) EndFunc 8) Link to comment Share on other sites More sharing options...
SpRaY Posted March 29, 2007 Author Share Posted March 29, 2007 Yes, it works but i cant figure out how ? Link to comment Share on other sites More sharing options...
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