Check and log when Skype user is online
Post ReplyCheck and log when Skype user is onlinePosted: Friday, June 25, 2010 [14:19:13] - 1
If you want to know if Skype user is online and when he/she was online - you could write a small AppleScript to do so. In addition you could log user status change. I use log feature in particular when I am away to see if my Skype watchdog for the server was up (if it was up). A small AppleScript: do shell script "echo |perl -n -e 'if(-f \"/skype.logs/last.skp.txt\") {unlink \"/skype.logs/last.skp.txt\";}'" repeat until Badid is true end repeat on SkypeCall(login) end SkypeCall on GetPart(s, p, d) end GetPart and Perl log script: #print "here - "; if($d =~ m/STATUS/) { $d =~ s/(ONLINESTATUS)( )(.*?)$/$&/si; print "$d ($wr)\n"; $d =~ s/USER( )(.*?)( )/$&/; if(-f "/skype.logs/last.$usr.skp.txt") {$last = `cat /skype.logs/last.$usr.skp.txt`;} else {$last='aaa';} unless($last eq $wr) { open(TXL,">/skype.logs/last.$usr.skp.txt"); $localtime = `date`; ($wd,$mo,$da,$ti,$sh,$ye) = split(/\s/,$localtime); open(TXT,">>/skype.logs/Skype.$usr.$mo.$ye.txt"); print TXT "$localtime\t$ut\t$usr\t$wr\n"; close(TXT); } ## END IF DIFFERENT } Make sure path to programs and logs in AppleScript and Perl script are fully qualified. If user status changes - it will be logged. |