Here is the script tested and working on Manila 2.5.1921.
Thanks to OP for the cool code, just fixed a few things and added Sense UI stop/start on run since that tends to piss off Manila.exe when you change a active file.
Code:
# moon phase TF3d image mover v1 2/6/09
# schettj/ppcgeeks edition
# you don't have to buy me a beer, it's free!
# donations via paypal? Why not: schettino@writeme.com
# current time
GetTime(hour,min,sec,day,month,year)
d=day
m=month
y=year
# current time for tomorrow's run
utime = TimeStamp()
# expect to run from \Windows\Startup, but you never know what people do!
mort = SystemPath("ScriptExe") & "\MortScript.exe"
script = SystemPath("ScriptPath") & "\" & SystemPath("ScriptName") & SystemPath("ScriptExt")
# Set next notification runtime for myself for tomorrow, at 8 hours 0 minute
# make it tomorrow (based off utime)
utime = utime + (((8+(24-hour))*60)-min)*60
# kill any lingering notification
RemoveNotifications(mort, script)
# set notify for myself at next time
RunAt( utime, mort, script)
# standard moon phase algorithm from the web
# note should be UTC time, so phases can be off by a day or so
# we're not talking hubble telescope here, just close enough is fun!
if (m < 3)
y = y - 1
m = m + 12
endif
m = m + 1
c = 365.25*y
e = 30.6*m
jd = c+e+d-694039.09
jd = jd / 29.53
b = Floor( jd, 0 )
jd = jd - b
phw = jd*24
ph = Round(phw, 0)
if (ph > 23)
ph = 0
endif
fname="\Windows\moon-" & ph & "_manila.x"
RegWriteDword("HKLM","\Software\Microsoft\Today\Items\HTC Sense","Enabled","0")
RedrawToday
SetFileAttribs( "\Windows\0fed33be_manila", "readonly", FALSE)
Copy (fname, "\Windows\0fed33be_manila", 1)
RegWriteDword("HKLM","\Software\Microsoft\Today\Items\HTC Sense","Enabled","1")
RedrawToday
I will fix my .cab install file I posted yesterday later with the fix.