Something like this?
Code:
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
#Include %A_ScriptDir%\CoHelper.ahk
#Include %A_ScriptDir%\IEControl.ahk
winX = 10
winY = 10
winW = 160
winH = 240
OnExit, Exiting
Gui, +Lastfound +Resize
hWnd := WinExist()
hIEC := IE_Add(hWnd, 0, 0, winW, winH - 30)
Gui, Show, x10 h10 w%winW% h%winH%, Mini last.fm Player
URL2Load = file://%A_ScriptDir%/lastfm.html
StringReplace, URL2Load, URL2Load, \, /, All
Gosub, GoURL
;MsgBox Page loaded!
Return ; End of AutoExecute section
; Load HTML
GoHTML:
IE_LoadHTML(hIEC, HTML2Load)
Gosub, WaitIEIsDone
HTML2Load =
Return
GoURL:
IE_LoadURL(hIEC, URL2Load)
Gosub, WaitIEIsDone
URL2Load =
Return
; Wait for loaded
WaitIEIsDone:
Loop
{
If (IE_ReadyState(hIEC) = 4) && !IE_Busy(hIEC)
Break
Sleep 100
}
Return
GuiSize:
WinGetPos, nowX, nowY, nowW, nowH, ahk_id %hWnd%
nowW := nowW - 10
nowH := nowH - 28
IE_Move(hIEC, 0, 0, nowW, nowH)
Return
Esc::
GuiClose:
Exiting:
Release(hIEC)
Gui Destroy
CoUninitialize()
AtlAxWinTerm()
ExitApp
Return
!^r::Reload ; for debugging
Needs a basic html-file with the code from the
widget generator from LastFM, and
CoHelper.ahk and IEControl.ahk
lastfm.html:
Quote:
<html>
<head>
</head>
<body>
<style type="text/css">table.lfmWidget20070829153340 td {margin:0 !important;padding:0 !important;border:0 !important;}table.lfmWidget20070829153340 tr.lfmHead a:hover {background:url(
http://cdn.last.fm/widgets/images/en/he ... i_grey.png) no-repeat 0 0 !important;}table.lfmWidget20070829153340 tr.lfmEmbed object {float:left;}table.lfmWidget20070829153340 tr.lfmFoot td.lfmConfig a:hover {background:url(
http://cdn.last.fm/widgets/images/en/footer/grey.png) no-repeat 0px 0 !important;;}table.lfmWidget20070829153340 tr.lfmFoot td.lfmView a:hover {background:url(
http://cdn.last.fm/widgets/images/en/footer/grey.png) no-repeat -85px 0 !important;}table.lfmWidget20070829153340 tr.lfmFoot td.lfmPopup a:hover {background:url(
http://cdn.last.fm/widgets/images/en/footer/grey.png) no-repeat -159px 0 !important;}</style>
<table class="lfmWidget20070829153340" cellpadding="0" cellspacing="0" border="0" style="width:110px;"><tr class="lfmHead"><td><a title="Music like Black Rebel Motorcycle Club" href="http://www.last.fm/listen/artist/Black%2520Rebel%2520Motorcycle%2520Club/similarartists" target="_blank" style="display:block;overflow:hidden;height:20px;width:110px;background:url(
http://cdn.last.fm/widgets/images/en/he ... i_grey.png) no-repeat 0 -20px;text-decoration:none;"></a></td></tr><tr class="lfmEmbed"><td><object width="110" height="140" style="float:left;" data="http://cdn.last.fm/widgets/radio/14.swf" type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"> <param name="movie" value="http://cdn.last.fm/widgets/radio/14.swf" /> <param name="flashvars" value="lfmMode=radio&radioURL=artist%2FBlack%2520Rebel%2520Motorcycle%2520Club%2Fsimilarartists&title=Music+like+Black+Rebel+Motorcycle+Club&theme=grey&autostart=1&lang=en" /> <param name="bgcolor" value="#999999" /> <param name="quality" value="high" /> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowNetworking" value="all" /> <embed src="http://cdn.last.fm/widgets/radio/14.swf" flashvars="lfmMode=radio&radioURL=artist%2FBlack%2520Rebel%2520Motorcycle%2520Club%2Fsimilarartists&title=Music+like+Black+Rebel+Motorcycle+Club&theme=grey&autostart=1&lang=en" bgcolor="#999999" width="110" height="140" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" allowScriptAccess="sameDomain" allowNetworking="all"> </embed> </object></td></tr><tr class="lfmFoot"><td style="background:url(
http://cdn.last.fm/widgets/images/footer_bg/grey.png) repeat-x 0 0;text-align:right;"><table cellspacing="0" cellpadding="0" border="0" style="width:110px;"><tr><td class="lfmConfig"><a href="http://www.last.fm/widgets/?url=artist%2FBlack%2520Rebel%2520Motorcycle%2520Club%2Fsimilarartists&colour=grey&size=mini&autostart=1&from=code&widget=radio" title="Get your own widget" target="_blank" style="display:block;overflow:hidden;width:85px;height:20px;float:right;background:url(
http://cdn.last.fm/widgets/images/en/footer/grey.png) no-repeat 0px -20px;text-decoration:none;"></a></td><td class="lfmPopup"style="width:25px;"><a href="http://www.last.fm/widgets/popup/?url=artist%2FBlack%2520Rebel%2520Motorcycle%2520Club%2Fsimilarartists&colour=grey&size=mini&autostart=1&from=code&widget=radio&resize=1" title="Load this radio in a pop up" target="_blank" style="display:block;overflow:hidden;width:25px;height:20px;background:url(
http://cdn.last.fm/widgets/images/en/footer/grey.png) no-repeat -159px -20px;text-decoration:none;" onclick="window.open(this.href + '&resize=0','lfm_popup','height=240,width=160,resizable=yes,scrollbars=yes'); return false;"></a></td></tr></table></td></tr></table>
</body>
</html>

Apologies for the non-wrapping
