Author Topic: Add AppleScript Function for Sunrise and Sunset  (Read 1476 times)

wurzelmac

  • Storm
  • *****
  • Posts: 1259
    • ITIROLPR2
    • Wetterstation Pr?graten am Gro?venediger
  • Station Details: Davis Vantage PRO2 Plus (24h fan aspirated, wireless) with UV/Solar | Weather Envoy Data Logger | Mac mini Mid 2011 2,7 GHz Intel Core i7 with 12 GB of RAM | 1x Canon EOS 1300D | macOS 10.14.6 Mojave
Add AppleScript Function for Sunrise and Sunset
« on: October 03, 2013, 02:46:13 pm »
Hi Stu,
if possible, would you add those two mentioned functions for use in AppleScript? I would be pleased if I can use them in a terminal script that controls the text overlay on my webcam picture (after sunset use a bright text color, during daylight use a dark text color). For if those two variables are available via AppleScript this will be an elegant workaround instead of telling the script every week or two to use other times.
Cheers,
Reinhard
Reinhard


WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2823
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: Add AppleScript Function for Sunrise and Sunset
« Reply #1 on: October 03, 2013, 05:10:34 pm »
Hi Reinhard,
Yes, I think this is already on the request list - should be able to get it done in the next development run.

What format do you want the data in?

Cheers,
Stu.

wurzelmac

  • Storm
  • *****
  • Posts: 1259
    • ITIROLPR2
    • Wetterstation Pr?graten am Gro?venediger
  • Station Details: Davis Vantage PRO2 Plus (24h fan aspirated, wireless) with UV/Solar | Weather Envoy Data Logger | Mac mini Mid 2011 2,7 GHz Intel Core i7 with 12 GB of RAM | 1x Canon EOS 1300D | macOS 10.14.6 Mojave
Re: Add AppleScript Function for Sunrise and Sunset
« Reply #2 on: October 03, 2013, 05:29:25 pm »
Hi Stu,
is the most common format hh:mm (I think no seconds :ss needed in this one) in 24hrs? Would be great!
Cheers,
Reinhard
Reinhard


Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1358
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2017 27" iMac 3.8 GHz i5, 40GB RAM, Mac OS 10.15, WeatherCat 3
Re: Add AppleScript Function for Sunrise and Sunset
« Reply #3 on: October 03, 2013, 11:56:47 pm »
Stu,

If you are going to make a 24 hour version, you might as well add the 12 hour version, too. No need for am/pm, as it is pretty obvious which end of the day the sun rises and sets.

I could add it to Edouard's Twitter feed if I ever get around to making a daily summary post.

Thanks,
Steve
Steve - Avon, Ohio, USA


CWOP: DW8454 ? WU: KOHAVON11 ? AWEKAS ? CoCoRaHS ? Skywarn ?  UK Met Office
MWWN ?PWSweather ? WeatherBug ? WeatherCloud ? Twitter ? Facebook