Sign in to follow this  
Followers 0
Gillboss

WAX

11 posts in this topic

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

Share this post


Link to post
Share on other sites



where are you starting windows media player in the code? Search the forum for hiding windows.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

what happens if WMP is open before hand and the script is then run?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#7 ·  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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Try ShellExecute(@ProgramFilesDir&"\a.m3u") instead of Run

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0