Jump to content

Recommended Posts

Posted (edited)

Well you could use the WebPage library and some Dhtml hybrid code like in this example - Inet connection must be available ( ESC quits application )

#include <GUIConstants.au3>
HotKeySet("ESC", "Exits")
$dll = DLLOpen("cwebpage.dll"); load in the Html library
If $dll = -1 then; check library load okay status or bust
    MsgBox(48,"ERROR...","CWebpage library failed...")
    Exit
EndIf

$Main = GUICreate("Graphics...",-1,-1,200,200,$WS_POPUP)
DLLCall($dll,"long","EmbedBrowserObject","hwnd",$Main); attach the browser object from library

$a = '<BODY scroll=no><OBJECT classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ID=APlayer style="position:absolute;left:0;top:0;width:105%;height:108%;cursor:hand">'
$a = $a & '<param name=AutoStart value=1><param name=uiMode value=mini><param name=URL value="http://www.dr.dk/netradio/drrock32.asx" alt="Help"></OBJECT></BODY>'

DLLCall($dll,"long","DisplayHTMLStr","hwnd",$Main,"str",$a); display the html code in the browser control
GUISetState()

While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = -3
        ExitLoop
    EndSelect
WEnd

Func Exits()
    DLLCall($dll,"long","UnEmbedBrowserObject","hwnd",$Main)
    DLLClose($dll)
EndFunc

The library WebPage.dll must be available in the system directory ( usely system32 ) - library could be downloaded from the auther Jeff Glatt site

http://www.borg.com/~jglatt/cwebpage.zip

This is a real nice library...

kjactive :(

Edited by kjactive
Posted

i've seen other media players made with au3 that doesn;t look like window media player or even not window media player. Possible to make that and skin my own graphics?

Posted

Do you mean without any visual intuition - it's posible to hide the application by just remove the line 'GUISetState()' or to make the medieplayer invisible change the tag value=mini to value=invisible

Medieplayer Tags are: invisible, none, mini, full, custum

kjactive :(

Posted

hmm, can i change the visual intuition to an image instead|| yes frenkly there is not much DHTML and this library can't do...

<BODY scroll=no>
<IMG style="position:absolute;left:0;top:0;width:110%;height:97%;cursor:none" src="C:\UpLoad\HtmlStrings\Tul.jpg" alt="Help">
<OBJECT classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ID=APlayer style="position:absolute;left:0;top:89%;width:110%;height:40">
 <param name=AutoStart value=0>
 <param name=uiMode value=mini>
 <param name=URL value="music file and path">
</OBJECT></BODY>

This is the DHTML code just exchange the one in my example ( and the radio and graphic file )

how to make the title bar visible so i can change the position|| well you have to look up some Gui style constants but something like $WS_OVERLAPPEDWINDOW

would do - the WebPage library do always use the whole window size but can be placed into a CHILD window and sized and placed just where one needs...

kjactive :(

Posted (edited)

well I sampled a new example to you - see if this fit your needs...

#include <GUIConstants.au3>
HotKeySet("ESC", "Exits")
$dll = DLLOpen("cwebpage.dll"); load in the Html library
If $dll = -1 then; check library load okay status or bust
    MsgBox(48,"ERROR...","CWebpage library failed...")
    Exit
EndIf

$Main = GUICreate("Graphics...",-1,-1,200,200,$WS_OVERLAPPEDWINDOW)
DLLCall($dll,"long","EmbedBrowserObject","hwnd",$Main); attach the browser object from library

DLLCall($dll,"long","DisplayHTMLStr","hwnd",$Main,"str",HtmlCode('C:\Pic\Bali.jpg')); display the html code in the browser control
GUISetState()

While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = -3
        ExitLoop
    EndSelect
WEnd
Exits()

Func HtmlCode($picture)
$a = '<BODY scroll=no><IMG style="position:absolute;left:0;top:0;width:110%;height:96%;cursor:none" src="' & $picture & '">'
$a = $a & '<OBJECT classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ID=APlayer style="position:absolute;left:0;top:89%;width:110%;height:41">'
Return $a & '<param name=AutoStart value=0><param name=uiMode value=mini><param name=URL value="http://www.dr.dk/netradio/drrock32.asx"></OBJECT></BODY>'
EndFunc

Func Exits()
    DLLCall($dll,"long","UnEmbedBrowserObject","hwnd",$Main)
    DLLClose($dll)
Exit
EndFunc

You can change the size of the window as to guidens to autoit limits ( only larger than start size ) well there is a way round of this small trouble...

The Webpage library always take the full window size...

Picture size here 'IMG style="position:absolute;left:0;top:0;width:110%;height:96%... it's in % of the total window size ( could also relate to pixels just remove the % character )

The medieplayer size and location is the <OBJECT ... 'where style="position:absolute;left:0;top:89%;width:110%;height:41">' controls this...

I made the dhtml code into a function with one argument ( picture file path and name ) in this manner it's easy to change...

The uiMode value=mini> tag control the medieplayer panel attached look in previous post...

Well this all teher is to it - hope this would help...

kjactive :(

Edited by kjactive
Posted

How can u use it in firefox?

Is that the same dll for firefox?

And is it possible that you can choose between radiostations?

Sapiente vince, rex, noli vincere ferro!

Posted

have u tryed using my zeroplayer to open this onlineradio??

if it works, pleas mail me, so i can add a new channel searcher.

*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
Posted

have u tryed using my zeroplayer to open this onlineradio??

if it works, pleas mail me, so i can add a new channel searcher.

<{POST_SNAPBACK}>

I decompiled your zeroplayer.exe but he give some errors if i try it with autoscite.

Sapiente vince, rex, noli vincere ferro!

Posted (edited)

WebPage library (.dll) is a browser library, simple as it is ( 6 functions ) though can do most things like to use Dhtml tags, include activeX objects like the medie player, well the list is just to long to mention and only a few things is not available in this control - Copy, cut and paste as it was in previous versions and I talked with the autcher Jeff Glatt about it and it's something about this control is actually two 'controls' - well that's that...

Find the online radio inet address, exchange the address in the above example and there it is, vidio files, 3D graphics well I have some problems with teletext pages but plain web pages and applets just the same, run just fine...

The control always fullfill the total window size but just put it into a child docking window and you can control the location and size...

The library can be used from different platforms that can include async libraries C++, Perl, ruby, rexx, euphobia, autoit3 etc.

Frontpage code would do if one don't care about overweight in code...

kjactive :(

Edited by kjactive
Posted (edited)

Nop this is Dhtml code, <IMG is a tag related to graphics and this kind of code is a kind of snap out from code done with Frontpage html editor where you can experimentate with code used with the DisplayHTMLStr function...

Webpages you have to use the page function as this:

DLLCall($dll,"long","DisplayHTMLPage","hwnd",$Main,"str",'http://www.sitecenter.dk/latenight/autoit/')

This is a lot simpler function but remember this is Hybrid code ( two languages working side by side ) - it's fun to be a hybrid...

kjactive :( :(

Edited by kjactive
Posted (edited)

Well that's true BUT I did wrote somewhere that you could put all into a child window as in this example...

#include <GUIConstants.au3>
HotKeySet("ESC", "Exits")
$dll = DLLOpen("cwebpage.dll"); load in the Html library
If $dll = -1 then; check library load okay status or bust
    MsgBox(48,"ERROR...","CWebpage library failed...")
    Exit
EndIf

$Main = GUICreate("Graphics...",800,600,-1,-1,$WS_OVERLAPPEDWINDOW)
DLLCall($dll,"long","EmbedBrowserObject","hwnd",$Main); attach the browser object from library
DLLCall($dll,"long","DisplayHTMLPage","hwnd",$Main,"str",'http://www.sitecenter.dk/latenight/autoit'); display the html code in the browser control
GUISetState()
$Child = GUICreate("Graphics...",160,80,-1,-1,$WS_CHILD,'',$Main)
DLLCall($dll,"long","EmbedBrowserObject","hwnd",$Child); attach the browser object from library
DLLCall($dll,"long","DisplayHTMLStr","hwnd",$Child,"str",HtmlCode('http://www.dr.dk/netradio/drrock32.asx')); display the html code in the browser control
GUISetState()

While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = -3
        ExitLoop
    EndSelect
WEnd
Exits()

Func HtmlCode($radio)
$a = '<BODY scroll=no>'
$a = $a & '<OBJECT classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ID=APlayer style="position:absolute;left:0;top:90%;width:110%;height:41">'
Return $a & '<param name=AutoStart value=1><param name=uiMode value=mini><param name=URL value="' & $Radio & '"></OBJECT></BODY>'
EndFunc

Func Exits()
    DLLCall($dll,"long","UnEmbedBrowserObject","hwnd",$Child)
    DLLCall($dll,"long","UnEmbedBrowserObject","hwnd",$Main)
    DLLClose($dll)
Exit
EndFunc

Don't you ever do experiments - well this is my last example so you just have to move around with the windows your self to get what you wants...

Well you could also write a webpage in frontpage with links to the sites you want and have a medieplayer playing in the background to do the same in just one browser, this is just a simple solution...

Best of luck

kjactive :(

Edited by kjactive

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