gnolivos Posted January 30, 2006 Share Posted January 30, 2006 I have created a script to AutoIT with a function called IsItDark that will return 1 if dark, and return 0 if daylight (based on your location).The function is used like this:IsItDark ($longitude, $latitude, $tzoff, $DSTactive)So, with this function, you can do whatever you want when it is dark -- automatically! Requires AutoIT v3.x (link to page)There is also a function in there that will give you the exact sunset/sunrise times if you want that...See attached files, and also look at the example provided.Enjoy!IsItDark.zip Kyan 1 Link to comment Share on other sites More sharing options...
ConsultingJoe Posted January 30, 2006 Share Posted January 30, 2006 I have created a script to AutoIT with a function called IsItDark that will return 1 if dark, and return 0 if daylight (based on your location).The function is used like this:IsItDark ($longitude, $latitude, $tzoff, $DSTactive)So, with this function, you can do whatever you want when it is dark -- automatically! Requires AutoIT v3.x (link to page)There is also a function in there that will give you the exact sunset/sunrise times if you want that...See attached files, and also look at the example provided.Enjoy!nice job, looks a little to much math for me but cool.It would be great to have a address to lat/long converter then use IsDark.au3 Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
GordonShumway Posted September 26, 2014 Share Posted September 26, 2014 (edited) Nice script! Thank you for "translating" it from this page: http://www.paulsadowski.com/WSH/suntimes.htm The original author was probably more a math-wizard than a programmer, with variable names like $qqq and the absence of commentary... I found http://itouchmap.com/latlong.html very handy when determining my Latitude and Longitude. Also http://www.timeanddate.com is good for finding out the "UTC TimeZone offset" and if "Daylight Savings Time" is on or off. Edit: Apparently https://www.timeanddate.com/ is better for visually impaired user Once again: thanks! Edited March 30, 2018 by Melba23 Added another link Link to comment Share on other sites More sharing options...
Kyan Posted September 27, 2014 Share Posted September 27, 2014 Awesome!, didn't know someone created a function (math) for the lat/long lines There is also a function in there that will give you the exact sunset/sunrise times if you want that...That would be nice Heroes, there is no such thing One day I'll discover what IE.au3 has of special for so many users using it.C'mon there's InetRead and WinHTTP, way better Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now