Jump to content

Recommended Posts

Posted

hi..

im trying to open radio site as hide:

http://www.mizrahit.co.il/mediaplayer.wax

so 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

Posted

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."

Posted

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.

Posted (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 by Gillboss
Posted

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?

Posted

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

Posted

Thanks!!!!

user can not know i use WMP :P

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

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...