Basically I am trying to accomplish a personal bit of code for a hobby.
The goal is to be able to read from a file that contains a single line that displays what I am currently listening to as it changes songs without any interaction from myself. Preferably i'd LIKE to be able to scroll the text field that contains the song name but I would be more than THRILLED to just get formattable text there.
Currently I've hit a roadblock because I am not that savvy (Shocked my PC hasn't caught fire thus far. . .) when it comes to programming.
What I have so far (Sorry for the terrible hack job):
<html>
<head>
<style>
body {
background-color: rgba(0, 0, 0, 0.65);
white-space: nowrap;
overflow: hidden;
margin: 0px 0px 0px 0px;
}
p.ex1 {
font:22px, arial, sans-serif;
color:rgb(255, 255, 255);
}
</style>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
setInterval('read',3000);
function read(){
jQuery.get('SongPlayback.html',
function(data){$('.contents').html(data);}
)
}
</script>
</head>
<body>
<p class="ex1">
Now Playing:<br>
<div id="contents"></div>
</p>
</body>
</html>
I am suspecting the major issue with all of this is it is to be run locally and I'm not sure if that is possible(?), have been reading quite a bit about how JS doesn't run locally for security reasons? Could be I'm just crapping all over the code. I have stored jquery.js in the same dir as the HTML file in addition to the "SongPlayback.html" file.
I have used <Object>
to house the text before but I couldn't get it to update on song (file) change.