Gillboss Posted June 21, 2008 Share Posted June 21, 2008 hi..im trying to open radio site as hide:http://www.mizrahit.co.il/mediaplayer.waxso i write this:#RequireAdmin #include <IE.au3> $Website = "[url="http://www.mizrahit.co.il/mediaplayer.wax"]http://www.mizrahit.co.il/mediaplayer.wax[/url]" _IECreate($Website, 0, 0)but Windos Media Player is not hiden.what code for open all hiden?and i dont want the user will know that script using Windows Media Player.oh and if must now using Windows Media Player, its perfer.thanks Link to comment Share on other sites More sharing options...
qazwsx Posted June 21, 2008 Share Posted June 21, 2008 where are you starting windows media player in the code? Search the forum for hiding windows. Link to comment Share on other sites More sharing options...
Gillboss Posted June 21, 2008 Author Share Posted June 21, 2008 test it.. it open automate Windows Media Player and about the hiding windows, there is code: WinSetState("","", @SW_HIDE) but i said: "and i dont want the user will know that script using Windows Media Player." Link to comment Share on other sites More sharing options...
qazwsx Posted June 21, 2008 Share Posted June 21, 2008 what happens if WMP is open before hand and the script is then run? Link to comment Share on other sites More sharing options...
Gillboss Posted June 21, 2008 Author Share Posted June 21, 2008 (edited) so..: #RequireAdmin #include <IE.au3> WinClose("Windows Media Player") Sleep(1000) $Website = "http://www.mizrahit.co.il/mediaplayer.wax" _IECreate($Website, 0, 0) Edited June 21, 2008 by Gillboss Link to comment Share on other sites More sharing options...
qazwsx Posted June 21, 2008 Share Posted June 21, 2008 So does it not work if WMP is alredy open. If it does, then open WMP manually and hide the window. Then when you run your code, WMP will already be hidden. Link to comment Share on other sites More sharing options...
Gillboss Posted June 22, 2008 Author Share Posted June 22, 2008 (edited) ok test it: #RequireAdmin #include <GUIConstants.au3> #include <IE.au3> WinClose("Windows Media Player") $GUI = GUICreate("Radio By G.H", 320, 180, (@DesktopWidth-320)/2, (@DesktopHeight-180)/2) $play = GUICtrlCreateButton("Play", 250, 10, 60, 30) GUISetState() While 1 WinSetState("Windows Media Player", "", @SW_HIDE) $mMsg = GUIGetMsg() Switch $mMsg Case $GUI_EVENT_CLOSE Exit Case $play _Play() EndSwitch WEnd Func _Play() $oIE = _IECreate("http://www.mizrahit.co.il/mediaplayer.wax", 0, 0, 0, 0) EndFunc but u still see flash.. test it yourself u will understand me.. press "Play" buttun.. Edited June 22, 2008 by Gillboss Link to comment Share on other sites More sharing options...
Gillboss Posted June 22, 2008 Author Share Posted June 22, 2008 oh and this dont work too,u still see "flash": #RequireAdmin #include <GUIConstants.au3> #include <IE.au3> WinClose("Windows Media Player") Run(@ProgramFilesDir&"\Windows Media Player\wmplayer.exe", "", @SW_HIDE) $GUI = GUICreate("Radio By G.H", 320, 180, (@DesktopWidth-320)/2, (@DesktopHeight-180)/2) $play = GUICtrlCreateButton("Play", 250, 10, 60, 30) GUISetState() ControlSend("Windows Media Player", "", "http://www.mizrahit.co.il/mediaplayer.wax") While 1 WinSetState("Windows Media Player", "", @SW_HIDE) $mMsg = GUIGetMsg() Switch $mMsg Case $GUI_EVENT_CLOSE Exit Case $play _Play() EndSwitch WEnd Func _Play() $oIE = _IECreate("http://www.mizrahit.co.il/mediaplayer.wax", 0, 0, 0, 0) EndFunc but i have idea, to create playist with autoit and then run it.. how doing it? Link to comment Share on other sites More sharing options...
Gillboss Posted June 22, 2008 Author Share Posted June 22, 2008 i tried.. #RequireAdmin #include <GUIConstants.au3> #include <File.au3> WinClose("Windows Media Player") Run(@ProgramFilesDir&"\Windows Media Player\wmplayer.exe", "", @SW_HIDE) $GUI = GUICreate("Radio By G.H", 320, 180, (@DesktopWidth-320)/2, (@DesktopHeight-180)/2) $play = GUICtrlCreateButton("Play", 250, 10, 60, 30) GUISetState() While 1 WinSetState("Windows Media Player", "", @SW_HIDE) $mMsg = GUIGetMsg() Switch $mMsg Case $GUI_EVENT_CLOSE Exit Case $play _Play() EndSwitch WEnd Func _Play() If FileExists(@ProgramFilesDir&"\a.m3u") Then FileDelete(@ProgramFilesDir&"\a.m3u") EndIf $file = FileOpen(@ProgramFilesDir&"\a.m3u", 1) FileWriteLine($file, "#EXTM3U") FileWriteLine($file, "#EXTINF:101, radio") FileWriteLine($file, "[url="http://www.mizrahit.co.il/mediaplayer.wax"]http://www.mizrahit.co.il/mediaplayer.wax[/url]") FileClose($file) Run(@ProgramFilesDir&"\a.m3u") EndFunc but if WMP is hidden, cant open m3u files :S Link to comment Share on other sites More sharing options...
FreeFry Posted June 22, 2008 Share Posted June 22, 2008 Try ShellExecute(@ProgramFilesDir&"\a.m3u") instead of Run Link to comment Share on other sites More sharing options...
Gillboss Posted June 22, 2008 Author Share Posted June 22, 2008 Thanks!!!! user can not know i use WMP not showing "Flash" #RequireAdmin #include <GUIConstants.au3> #include <File.au3> WinClose("Windows Media Player") Run(@ProgramFilesDir&"\Windows Media Player\wmplayer.exe", "", @SW_HIDE) $GUI = GUICreate("Radio By G.H", 320, 180, (@DesktopWidth-320)/2, (@DesktopHeight-180)/2) $play = GUICtrlCreateButton("Play", 250, 10, 60, 30) GUISetState() While 1 WinSetState("Windows Media Player", "", @SW_HIDE) $mMsg = GUIGetMsg() Switch $mMsg Case $GUI_EVENT_CLOSE Exit Case $play _Play() EndSwitch WEnd Func _Play() If FileExists(@ProgramFilesDir&"\a.m3u") Then FileDelete(@ProgramFilesDir&"\a.m3u") EndIf $file = FileOpen(@ProgramFilesDir&"\a.m3u", 1) FileWriteLine($file, "#EXTM3U") FileWriteLine($file, "#EXTINF:101, radio") FileWriteLine($file, "http://www.mizrahit.co.il/mediaplayer.wax") FileClose($file) ShellExecute(@ProgramFilesDir&"\a.m3u") WinActivate("Radio By G.H") EndFunc 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