 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
evan
Joined: 19 Feb 2009 Posts: 125
|
Posted: Mon Nov 02, 2009 9:14 pm Post subject: Sun Light Map Wallpaper |
|
|
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 |
|
 |
Aravind
Joined: 30 Oct 2009 Posts: 58 Location: Kerala, India
|
Posted: Thu Dec 03, 2009 6:22 am Post subject: Cool ! |
|
|
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  _________________
Don't Take Life Too Seriously,Because In The End, You Won't Escape It Alive Anyway |
|
| Back to top |
|
 |
RocknRoller Guest
|
Posted: Fri Dec 04, 2009 4:21 am Post subject: |
|
|
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
|
Posted: Sat Dec 12, 2009 9:46 am Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
SoggyDog
Joined: 02 May 2006 Posts: 783 Location: Greeley, CO
|
|
| Back to top |
|
 |
netfun81
Joined: 28 Oct 2006 Posts: 58
|
|
| Back to top |
|
 |
SoggyDog
Joined: 02 May 2006 Posts: 783 Location: Greeley, CO
|
|
| Back to top |
|
 |
Guest
|
Posted: Thu Dec 17, 2009 3:38 am Post subject: |
|
|
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
|
|
| Back to top |
|
 |
Behzad Guest
|
Posted: Sat Aug 28, 2010 6:35 am Post subject: |
|
|
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
|
Posted: Sat Aug 28, 2010 5:57 pm Post subject: Re: |
|
|
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 |
|
 |
JoeSchmoe
Joined: 17 Feb 2008 Posts: 303
|
Posted: Sun Aug 29, 2010 3:07 am Post subject: Re: |
|
|
| 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 |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|