automatr wrote:Is there a way to keep a running log of only specific events, perhaps in a text file? ...
And then jay wrote:...Otherwise you'd need to write script(s).
automate wrote:...If I could just maintain a log of the DrivewayArrivingTimestamp Variable and DrivewayDepartingTimestamp I would be home free.DrivewayArriving (used as a programming flag and is reset after a few seconds)
DrivewayArrivingTimestamp (uses the "insert timestamp into variable" from the Action Collection)
DrivewayDeparting (used as a programming flag and is reset after a few seconds)
DrivewayDepartingTimestamp (uses the "insert timestamp into variable" from the Action Collection)
set theLogText to "A car has arrived"
set theLogEntry to the value of variable "DrivewayArrivingTimestamp" & ": " & theLogText
do shell script ("/bin/echo \"" & theLogEntry & " \">>$HOME/driveway.log")
tell application "IndigoServer"
set waterUsedToday to value of variable "WaterGallonsUsedToday"
end tell
tell application "iCal"
tell calendar "Water"
set theDate to current date
make new event at end with properties {summary:"Water used today: " & waterUsedToday, start date:theDate, allday event:true}
end tell
end tell
Users browsing this forum: No registered users and 15 guests