Page 3 of 6

Posted: Mon Sep 26, 2005 3:14 pm
by makc
I'll get back to you tomorrow.

Posted: Mon Sep 26, 2005 5:18 pm
by lode
makc wrote:I'll get back to you tomorrow.
Ok. Thanks for your help!

Posted: Tue Sep 27, 2005 8:30 am
by makc
Create file c:\1.html, and paste this code into it:

Code: Select all

<body bgcolor=black><table width=100% height=100%><tr valign=middle><td><img id=im src="" width=100%></td></tr></table></body>
<script>

d = new Date()
yy = d.getFullYear().toString().substr(2)
mm = (d.getMonth()+1 > 9) ? (d.getMonth()+1).toString() : ("0"+(d.getMonth()+1).toString())
dd = (d.getDate() > 9) ? d.getDate().toString() : ("0"+d.getDate().toString())
site_url = 'http://antwrp.gsfc.nasa.gov/apod/ap' + yy + mm + dd + '.html'

var xhttp = new ActiveXObject("MSXML2.XMLHTTP");
xhttp.Open("GET", site_url, false);
xhttp.Send(); html = xhttp.ResponseText

// this parser is likely to fail if anything changes,
// but today it works
i1 = html.toLowerCase().indexOf("a href=\"image")
html = html.substr(i1 + 8)
i1 = html.indexOf("\"")
html = html.substr(0, i1)

im.src = 'http://antwrp.gsfc.nasa.gov/apod/' + html
</script>
Then, go to desktop properties and set 1.html as your background. Voila:

Image

8)

This works on my XP Pro/2002. I have many programming software installed, so there's a chance you are missing something I have. In this case, you may try to find it here, or forget it.

Posted: Wed Sep 28, 2005 6:18 am
by makc
today's APOD has broke the code above, since it was larger than my desktop. so I had to replace

Code: Select all

<img id=im src="" width=100%>
with

Code: Select all

<img id=im src="" width=1024>
, so now it looks just fine:

Image

did it work for you, btw?

P.S.: I am thinking about how do I get rid of those black bricks under icons (i.e., how to make text background transparent)?

Posted: Wed Sep 28, 2005 11:16 am
by lode
Hi,

This works perfect! I realy appriciate you made this script :)

My resolution is 1400x1050, so I changed it into 1370 as width, that causes the black border to the right to appear as well as to the left. When I use 1400, the border at the right is gone. Now it looks very nice :)

I changed one other thing in the script, an anchor around the imgage. So now when I click my desktop I'm send to the main APOD site where I can read what this is.

About the transparent background, I don't know exactly. I though WinXP did that automaticly, but here I have the same problem.
One solution I can think of is just have less icons on my desktop, just clean it up a bit :)

Posted: Wed Sep 28, 2005 4:03 pm
by William Roeder
how do I get rid of those black bricks under icons
control panel/display/desktop/color allow you to change the color but unfortunately not the transparency.

Posted: Thu Sep 29, 2005 1:10 am
by Sternreisender
There is a program that allows you to do this, as well. APOD.

Posted: Thu Sep 29, 2005 11:04 am
by makc
Software/APOD wrote:You may not modify this software product in any way.
There's no source :(
William Roeder wrote:control panel/display/desktop/color allow you to change the color but unfortunately not the transparency.
True. Windows only makes it transparent if background image is bitmap. So, for this nice feature to work with APOD image, script would have to actually download (save to disk) an image, and then replace current background with it. Any other options :?:

Posted: Thu Sep 29, 2005 11:18 am
by Empeda
....and it doesn't appear to do anything either... :(

Makc - do you think it might be an idea to put the script on the forum as a sticky? I suspect a lot of people would like to use/update it?

Posted: Fri Sep 30, 2005 6:24 am
by makc
lode wrote:...the black border to the right to appear as well as to the left. When I use 1400, the border at the right is gone...
Here's html update to fix borders:

Code: Select all

<body bgcolor=black style="margin:0; border:0;"><table cellpadding=0 cellspacing=0 width=100% height=100%>
Image
Empeda wrote:...it might be an idea to put the script on the forum as a sticky... I suspect a lot of people would like to use/update it
Give me a good suggestion on transparency issue, and I will stick it.

APOD needs a feed!

Posted: Sat Sep 02, 2006 10:14 pm
by stray
I love APOD (long time viewer, new forums subscriber), but it really, REALLY needs an RSS or Atom feed. That way, people can see a new APOD every day right in their feedreaders and update automatically. Heck, one could even write a script to make a person's desktop the APOD.

Posted: Sat Sep 02, 2006 11:26 pm
by BMAONE23
http://asterisk.apod.com/vie ... 309390b99d

Stray,
This thread has what you were talking about for your desktop.


Welcome to the food chain

Posted: Sun Sep 03, 2006 12:34 am
by CharlesBell
There is a freeware program which will set you windows desktop to the current APOD every day.

I use it to see and learn something new everyday.

Posted: Sun Sep 03, 2006 10:49 am
by astro_uk
There is a desktop widget for the mac that also updates apod daily.

Posted: Sun Sep 03, 2006 9:34 pm
by kev1701e
Here's the one I use:

http://www.acme.com/jef/apod/rss.xml


kev

Posted: Mon Nov 20, 2006 9:11 pm
by silentway
Thanks, kev1701e. The RSS feed is a good call.

Has the idea been raised to add an APOD Photocast? (A forum search yielded nothing.)

It's a special type of Blog that people can subscribe to via any RSS-compatible browser or RSS reader. The bonus is that if the subscriber has a Mac it will update right within their iPhoto 6 app. I think it takes a Mac to create, but can be read by anyone, PC or Mac. PC users just see it as a regular RSS feed. (I have not tried it myself though... anyone?)

http://www.apple.com/ilife/iphoto/featu ... sting.html
http://docs.info.apple.com/article.html ... n/pc2.html
http://docs.info.apple.com/article.html ... lp295.html
http://www.macworld.com/2006/06/feature ... /index.php

Heck, I bet with the right connections, Apple would pay to do it... it would be a great example of the otherwise under-utilized Photocasting concept.

btw, the PC desktop app doesn't have any option to view or download pics except putting it on your desktop.

Posted: Tue Nov 21, 2006 4:18 pm
by CharlesBell
The link to the installation zip file is

http://nightskylive.net/software/apod/apod_inst.zip

Posted: Wed Nov 22, 2006 10:42 pm
by silentway
I looked into photocasts some more, and it looks even better. First, folks don't need to have a Mac or use iPhoto to subscribe to a photocast. Windows users can join the party too:
http://www.macosxhints.com/article.php? ... 6102750285
http://www.macosxhints.com/article.php? ... 4005259361

Then, how to create a photocast for free, without paying for Apple's .Mac hosting service:
http://www.macosxhints.com/article.php? ... 2055330166
http://www.bubbleshare.com/

Flikr is another possibility, a Flickr album's feed can be read as a photocast using these free translators:
http://phlikr.3xi.org/
http://photocastr.com/
http://www.flickr.com/forums/ideas/1710 ... =photocast

Code not longer working

Posted: Sun May 27, 2007 1:55 am
by Hueznar
makc wrote:Create file c:\1.html, and paste this code into it:

Code: Select all

<body bgcolor=black><table width=100% height=100%><tr valign=middle><td><img id=im src="" width=100%></td></tr></table></body>
<script>

d = new Date()
yy = d.getFullYear().toString().substr(2)
mm = (d.getMonth()+1 > 9) ? (d.getMonth()+1).toString() : ("0"+(d.getMonth()+1).toString())
dd = (d.getDate() > 9) ? d.getDate().toString() : ("0"+d.getDate().toString())
site_url = 'http://antwrp.gsfc.nasa.gov/apod/ap' + yy + mm + dd + '.html'

var xhttp = new ActiveXObject("MSXML2.XMLHTTP");
xhttp.Open("GET", site_url, false);
xhttp.Send(); html = xhttp.ResponseText

// this parser is likely to fail if anything changes,
// but today it works
i1 = html.toLowerCase().indexOf("a href="image")
html = html.substr(i1 + 8)
i1 = html.indexOf(""")
html = html.substr(0, i1)

im.src = 'http://antwrp.gsfc.nasa.gov/apod/' + html
</script>
Then, go to desktop properties and set 1.html as your background. Voila:

Image

8)

This works on my XP Pro/2002. I have many programming software installed, so there's a chance you are missing something I have. In this case, you may try to find it here, or forget it.
Hi, I was looking for a way to capture APOD image for my personal web, and I've found this code but is not working for me. I followed all steps but is not longer working.

Any idea to fix the problem?.

Thanks in advance.

Posted: Wed Jun 06, 2007 1:24 pm
by makc
There can be two problems with above code:
1. it is IE specific;
2. it is subject to cross-domain browser security restrictions (and therefore works off your PC only, and not off the web).
It was meant to bring APOD to your desktop, not to your webpage. To put it on your webpage, you could:
1. either rewrite the code above into server-side language like PHP;
2. or use link from this post (by "ckam" :) warning: it redirects to FULLSIZE image).
I might spare some time to do 1 later (probably MUCH later).

EDIT: while trying to do 1, I was looking for an image to show whenever there are any errors, and found this:
Image
which makes option 3 that you can use on your site this way:

Code: Select all

<a href="http://antwrp.gsfc.nasa.gov/apod/" alt="APOD"><img src="http://antwrp.gsfc.nasa.gov/apod/calendar/today.jpg" /></a>

Problem with Desktop Background

Posted: Mon Oct 08, 2007 6:34 am
by KerryBarger
I am a daily viewer & absolutely love the pictures that appear regularly as my desktop background. I usually try to view the explanation of the photo/s and sometimes I even grasp elements of the detailed explanation...(HA!) :roll:
However, the explanation headline always overlaps the first line of the script and is barely legible. When I am curious enough about reading the explanation, I go to the APOD website where I can actually read the first sentence of the explanation, but this should not be necessary everyday for everyone who uses this wonderful program as many of my friends do. I was not sure if anyone on your APOD team is aware of this glitch and have been wanting to bring this to someone's attention who can correct this daily flaw in the APOD desktop background. Possibly this is a problem with my PC, but I've made all the application ajustments I could find & none worked. I signed on to this forum specifically to try to get this annoying problem corrected. Please advise.

Posted: Mon Oct 08, 2007 12:18 pm
by geckzilla
It might have something to do with the fact that APOD uses paragraph tags but never actually closes them... bad html.

bad HTML ??? Paragraph tags ???

Posted: Mon Oct 08, 2007 7:15 pm
by KerryBarger
Sorry, I don't understand... Is this something I can correct or change?

Posted: Mon Oct 08, 2007 7:58 pm
by geckzilla
No.

Posted: Tue Oct 09, 2007 6:13 am
by Qev
Which browser software are you using, btw?