AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sun Light Map Wallpaper

 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
evan



Joined: 19 Feb 2009
Posts: 125

PostPosted: Mon Nov 02, 2009 9:14 pm    Post subject: Sun Light Map Wallpaper Reply with quote

Images from www.die.net/earth/
they provide real time world sunlight map, which is excellent for a dark theme desktop wallpaper
i am currently using the Hemisphere 1152 view for my desktop
i believe they update the images every 15-30mins, so no point of putting the timer for less than 10mins
screenshot:


Code:
#Persistent
Gui, +toolwindow +alwaysontop
Gui, Add, Text, x10 y10, Map Type:
Gui, Add, DropDownList, vMap x+6 y8 w80 choose1, mercator|hemisphere|mollweide|peters|rectangular
Gui, Add, Text, x10 y40, Map Size:
Gui, Add, DropDownList, x+10 y38 vSize w80 choose1, 800|1024|1152|1280|1440|1600
Gui, Add, Text, x10 y70, Update:
Gui, Add, Edit, x+18 y68 w80, 30
Gui, Add, Text, x125 y73 vmin, min
Gui, Add, Button, gP x10 y100, Preview
Gui, Add, Button, gS x+10 y100, Start
Gui, Show, x0 y0,World Sunlight Map

return
P:
Gui, submit, nohide
Settimer, Download, -1
return

S:
Gui, submit, hide
if min < 10
min = 10
time := min * 60000
Settimer, Download, %time%
return

Download:
UrlDownloadToFile, http://static.die.net/earth/%Map%/%Size%.jpg, %A_temp%\hemisphere.jpg
DllCall("SystemParametersInfo", UInt, 0x14, UInt, 0, Str, A_temp . "\hemisphere.jpg", UInt, 2)
return
 


or if u want to add this to ur 24/7 script, simply use the below format:
Code:
#Persistent
Settimer, Download, 1800000
Download:
UrlDownloadToFile, http://static.die.net/earth/hemisphere/1152.jpg, %A_temp%\hemisphere.jpg
DllCall("SystemParametersInfo", UInt, 0x14, UInt, 0, Str, A_temp . "\hemisphere.jpg", UInt, 2)
return
 

*Make sure the default display setting is Center and Black background

Doesnt the earth look beautiful?
Back to top
View user's profile Send private message
Aravind



Joined: 30 Oct 2009
Posts: 58
Location: Kerala, India

PostPosted: Thu Dec 03, 2009 6:22 am    Post subject: Cool ! Reply with quote

Really cool dude! awesome thinking. I suggest you add a rich GUI with some cool options, previews, & refresh time settings. It would be great if it sports a good UI. Maybe i could help

Anyway, Awesome work dude Smile
_________________


Don't Take Life Too Seriously,Because In The End, You Won't Escape It Alive Anyway Wink
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
RocknRoller
Guest





PostPosted: Fri Dec 04, 2009 4:21 am    Post subject: Reply with quote

Very interesting idea but I can't make it work. The picture is downloaded but it is not replacing my wallpaper.

I am on Windows XP, is there anything I need to change in the dll call?

Thanks!
Back to top
Aravind



Joined: 30 Oct 2009
Posts: 58
Location: Kerala, India

PostPosted: Sat Dec 12, 2009 9:46 am    Post subject: Reply with quote

RocknRoller wrote:
Very interesting idea but I can't make it work. The picture is downloaded but it is not replacing my wallpaper.

I am on Windows XP, is there anything I need to change in the dll call?

Thanks!


Try this:

Code:


Download:
UrlDownloadToFile, http://static.die.net/earth/%Map%/%Size%.jpg, %A_temp%\hemisphere.jpg
DllCall("SystemParametersInfo", UInt, 0x14, UInt, 0, Str, A_temp."\hemisphere.jpg", UInt, 2)
return


_________________


Don't Take Life Too Seriously,Because In The End, You Won't Escape It Alive Anyway Wink
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
SoggyDog



Joined: 02 May 2006
Posts: 783
Location: Greeley, CO

PostPosted: Mon Dec 14, 2009 10:50 pm    Post subject: Reply with quote

I have had little success with evan's script;
Aravind's suggestion fails to resolve the issue;
Any other suggestions?
_________________

SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
netfun81



Joined: 28 Oct 2006
Posts: 58

PostPosted: Tue Dec 15, 2009 1:02 am    Post subject: Reply with quote

I couldn't get this script to work either. So instead I downloaded this:

http://codefromthe70s.org/desktopearth_dl.aspx

seems to work well and shows cloud cover
Back to top
View user's profile Send private message
SoggyDog



Joined: 02 May 2006
Posts: 783
Location: Greeley, CO

PostPosted: Tue Dec 15, 2009 1:18 am    Post subject: Reply with quote

Thanks;
I've been running DesktopEarth for years;
I was interested in the AHK solution;
I'll keep my eyes open for a functional version of this script.
_________________

SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Guest






PostPosted: Thu Dec 17, 2009 3:38 am    Post subject: Reply with quote

make sure u have UAC turn off
once i turn it off, the script works for me
i assume either the UrlDownloadToFile or the Dllcall needs it
well i also notice that the Dllcall is straight from the help file example script, so that should work in most user's computer, at least on my w7 32 bit @@
Back to top
SoggyDog



Joined: 02 May 2006
Posts: 783
Location: Greeley, CO

PostPosted: Thu Dec 17, 2009 2:41 pm    Post subject: Reply with quote

Thank you for the suggestion, but UAC was introduced with Windows Vista;
I am still running under XP.
_________________

SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Behzad
Guest





PostPosted: Sat Aug 28, 2010 6:35 am    Post subject: Reply with quote

netfun81 wrote:
I couldn't get this script to work either. So instead I downloaded this:

http://codefromthe70s.org/desktopearth_dl.aspx

seems to work well and shows cloud cover



Hallo Dude,
I tested the sw with win 7. it works well.
thank you so much.

regards
Back to top
gahks



Joined: 10 Jan 2009
Posts: 32

PostPosted: Sat Aug 28, 2010 5:57 pm    Post subject: Re: Reply with quote

Cool, thanks!

Works perfectly on Vista.

It probably doesn't work on XP because the format of the images is jpg and SystemParametersInfo works on XP and older only with bmps.
Try converting the image before making the DllCall.

Cheers
Back to top
View user's profile Send private message
JoeSchmoe



Joined: 17 Feb 2008
Posts: 303

PostPosted: Sun Aug 29, 2010 3:07 am    Post subject: Re: Reply with quote

gahks wrote:
It probably doesn't work on XP because the format of the images is jpg and SystemParametersInfo works on XP and older only with bmps.
Try converting the image before making the DllCall.
I just checked and according to this MSDN page, .jpgs won't work on XP or win2k (search for "SPI_SETDESKWALLPAPER").

The code worked great for me on Windows 7. I don't normally have a desktop image, so I had to turn wallpapers on before the script would work.

I preferred the rectangular projection, though:
http://static.die.net/earth/rectangular/1600.jpg
or if you have a 1280 pixel wide monitor:
http://static.die.net/earth/rectangular/1280.jpg
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group