chelseafc Posted May 30, 2005 Posted May 30, 2005 i m trying to make an audio player for an online radio station. Can this actually be made? To make it open connect to an address such as http://www.blahradio.com/radio.wax when the exe file is executed. Also want to include a banner for the station like a logo. Can this be made?thanks loads
kjactive Posted May 30, 2005 Posted May 30, 2005 (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) EndFuncThe library WebPage.dll must be available in the system directory ( usely system32 ) - library could be downloaded from the auther Jeff Glatt sitehttp://www.borg.com/~jglatt/cwebpage.zipThis is a real nice library...kjactive Edited May 30, 2005 by kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc...
chelseafc Posted May 31, 2005 Author Posted May 31, 2005 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?
kjactive Posted May 31, 2005 Posted May 31, 2005 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 Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc...
chelseafc Posted May 31, 2005 Author Posted May 31, 2005 hmm, can i change the visual intuition to an image instead? and how to make the title bar visible so i can change the position. thx.
kjactive Posted May 31, 2005 Posted May 31, 2005 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 Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc...
chelseafc Posted June 1, 2005 Author Posted June 1, 2005 I still cant change the title bar and also want to change the size of the exe so the image fits perfectly.
kjactive Posted June 1, 2005 Posted June 1, 2005 (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 June 1, 2005 by kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc...
chelseafc Posted June 1, 2005 Author Posted June 1, 2005 thx alot man, is it possible to make it display a webpage instead of an image, cos it will be alot better! thx
Mosquitos Posted June 1, 2005 Posted June 1, 2005 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!
zeroZshadow Posted June 1, 2005 Posted June 1, 2005 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...
Mosquitos Posted June 1, 2005 Posted June 1, 2005 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!
kjactive Posted June 1, 2005 Posted June 1, 2005 (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 June 1, 2005 by kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc...
chelseafc Posted June 2, 2005 Author Posted June 2, 2005 i m still a starter, any chance of just replacing the img code with webpage code?
kjactive Posted June 2, 2005 Posted June 2, 2005 (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 June 2, 2005 by kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc...
chelseafc Posted June 2, 2005 Author Posted June 2, 2005 now the radio is gone >.<, webpage works tho thx!
kjactive Posted June 2, 2005 Posted June 2, 2005 well it could be Init tho thx ( what that stands for anyway ) The Page and str functions can be used side by side but go back to the previous example and start all over... kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc...
chelseafc Posted June 2, 2005 Author Posted June 2, 2005 i tried to paste the link line in the first code but only the webpage shows
kjactive Posted June 2, 2005 Posted June 2, 2005 (edited) Well that's true BUT I did wrote somewhere that you could put all into a child window as in this example... expandcollapse popup#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 June 2, 2005 by kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc...
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