Monitor Sync (AppleScript)

Monday, May 24, 2004


property logPath : ""

on getlogname()
   
   
set now to the current date
   
set logname to the year of now & "_" & the month of now & "_" & the day of now & ".log" as string
   
set logPath to "\"/Users/shared/RsyncLogs/" & logname & "\"" as string
   
   
return logPath
   
end getlogname


on monitor()
   
set lp to getlogname()
   
set s to do shell script ("tail -n 2 " & lp)
   
feedback(s)
   
end monitor

on feedback(s)
   
tell application "SEC Helper"
      
show screen duration 6 message s
   
end tell
end feedback


on run
   
getlogname()
   
idle {}
end run

on idle
   
   
monitor()
   
return 2
   
end idle
Top | Made with Script Debugger 3.0