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

wurzelmac

  • Storm
  • *****
  • Posts: 1361
    • 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 2023 M2 8/256 | 1x Canon EOS 1300D | macOS Sonoma 14.2
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: 2911
    • 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: 1361
    • 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 2023 M2 8/256 | 1x Canon EOS 1300D | macOS Sonoma 14.2
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: 1555
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
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
PWSweather - WeatherCloud - Twitter - Facebook