Hi,
I’m try to create the ‘Idle time recorder’ in my mac. I have done it partially. But I can’t run this script automatically. Kindly go throw the below code and help on this topic.
set mytime to 0
delay 300
set mytime to "5"
do shell script "/usr/sbin/ioreg -c IOHIDSystem | /usr/bin/awk '/HIDIdleTime/ {print int($NF/1000000000); exit}'"
set msg to "no"
tell application "Finder"
if exists POSIX file "/Volumes/HDD1/Users/Shared/temp/idle/IdleTime.txt" then
do shell script "echo '5' >> /Volumes/HDD1/Users/Shared/temp/idle/IdleTime.txt"
else
do shell script "echo " & quoted form of mytime & " >> /Volumes/HDD1/Users/Shared/temp/idle/IdleTime.txt"
end if
end tell
I’m try to use ‘contab -e [path]’, but, this method also not support effectively.
Thanks in advance,
Selva