Posted by Kevin Morgan on 11/11/56 11:16
I've written a script that extracts part of a remote web page for me to
put into a mac dashboard widget. What I need to do is replace each:
<a class='pollBoxA' href='http://www.foobar.com'> text goes here </a>
with
<span onclick=”widget.openURL(‘http://www.foobar.com/’);”> text goes
here</span>.
Here's an example of the output:
<!-- ***START*** [New Forum Posts] ***START*** -->
.....
<tr><!-- Row Four [body content]-->
<td background="interface/box_L4.gif" width=6><img
src="interface/spacer.gif" width=1 height=1></td>
<td background="interface/box_C4.gif" width="100%"><table border=0
cellspacing=0 cellpadding=0 width='100%'><tr><td width=15><img
src='interface/arrowOrange_right.gif' alt='' width=9 height=8
border=0></td><td><a class='pollBoxA'
href='http://www.osxaudio.com/forums/viewtopic.php?p=186890#186890'>Sometimes,
cutting into the present releases the
future</a></td></tr><tr><td> </td><td class='pollBoxData'>by
<b>Loopy C</b></td></tr><tr><td width=15><img
src='interface/arrowOrange_right.gif' alt='' width=9 height=8
border=0></td><td><a class='pollBoxA'
href='http://www.osxaudio.com/forums/viewtopic.php?p=186889#186889'>Why
Arturia should do a Buchla System 200
V...</a></td></tr><tr><td> </td><td class='pollBoxData'>by
<b>donaldm</b></td></tr><tr><td width=15><img
src='interface/arrowOrange_right.gif' alt='' width=9 height=8
border=0></td><td><a class='pollBoxA'
href='http://www.osxaudio.com/forums/viewtopic.php?p=186888#186888'>machine
freezes whhen running Logic</a></td></tr><tr><td> </td><td
class='pollBoxData'>by <b>kanker</b></td></tr><tr><td width=15><img
src='interface/arrowOrange_right.gif' alt='' width=9 height=8
border=0></td><td><a class='pollBoxA'
href='http://www.osxaudio.com/forums/viewtopic.php?p=186887#186887'>Luxonix
Ravity AU Available!</a></td></tr><tr><td> </td><td
class='pollBoxData'>by <b>mr.jones</b></td></tr><tr><td width=15><img
src='interface/arrowOrange_right.gif' alt='' width=9 height=8
border=0></td><td><a class='pollBoxA'
href='http://www.osxaudio.com/forums/viewtopic.php?p=186886#186886'>Best
Recording Technique for Flute</a></td></tr><tr><td> </td><td
class='pollBoxData'>by <b>kanker</b></td></tr><tr><td width=15><img
src='interface/arrowOrange_right.gif' alt='' width=9 height=8
border=0></td><td><a class='pollBoxA'
href='http://www.osxaudio.com/forums/viewtopic.php?p=186885#186885'>EMS
1000+ posts - Congratulate me and boost your post
count!</a></td></tr><tr><td> </td><td class='pollBoxData'>by
<b>?bob</b></td></tr><tr><td width=15><img
src='interface/arrowOrange_right.gif' alt='' width=9 height=8
border=0></td><td><a class='pollBoxA'
href='http://www.osxaudio.com/forums/viewtopic.php?p=186884#186884'>Sample
Manager refuses to start up</a></td></tr><tr><td> </td><td
class='pollBoxData'>by <b>jamieh</b></td></tr><tr><td width=15><img
src='interface/arrowOrange_right.gif' alt='' width=9 height=8
border=0></td><td><a class='pollBoxA'
href='http://www.osxaudio.com/forums/viewtopic.php?p=186878#186878'>Firewire
interface - converter/pre quality?</a></td></tr><tr><td> </td><td
class='pollBoxData'>by <b>captain54</b></td></tr><tr><td width=15><img
src='interface/arrowOrange_right.gif' alt='' width=9 height=8
border=0></td><td><a class='pollBoxA'
href='http://www.osxaudio.com/forums/viewtopic.php?p=186876#186876'>Reason
and wave samples?</a></td></tr><tr><td> </td><td
class='pollBoxData'>by <b>Wil1870</b></td></tr><tr><td width=15><img
src='interface/arrowOrange_right.gif' alt='' width=9 height=8
border=0></td><td><a class='pollBoxA'
href='http://www.osxaudio.com/forums/viewtopic.php?p=186871#186871'>Best
USB Hub</a></td></tr><tr><td> </td><td class='pollBoxData'>by
<b>lance</b></td></tr></table>
.......
<!-- ***END*** [New Forum Posts] ***END*** -->
How on earth can I do this?
Thanks,
Kev
Navigation:
[Reply to this message]
|