It seems I'm onto something. I used one of the custom attributes and copied the script and modified it to work for what I'm looking for. I am a novice at scripting. I usually have to hunt for the code I want.
Here is what I found from the screensaver attribute modified to determine logging for Adium (I make no guarantees in your environment):
#!/bin/sh
currentUser=last -1 | awk '{print $1}'
if [ -f "/usr/bin/mcxquery" ]; then
result=/usr/bin/mcxquery -user "$currentUser" | grep -A 1 -w com.apple.screensaver | tail -1 | awk '{print $5}'
if [ "$result" == "0" ]; then
result="False"
elif [ "$result" == "1" ]; then
result="True"
else
result="Not set."
fi
fi
echo "<result>$result</result>"
I don't know if I need the mcxquery in that line. I left it in there and it's providing results for me as either True or False on my test machine. Can anyone else determine if this works for them?
Thanks
I pasted the wrong code into this:
#!/bin/sh
currentUser=last -1 | awk '{print $1}'
if [ -f "/usr/bin/mcxquery" ]; then
result=defaults read /Users/"$currentUser"/Library/Application Support/Adium 2.0/Users/Default/Logging | grep Logging | awk '{print $4}'
if [ "$result" == "0;" ]; then
result="False"
elif [ "$result" == "1;" ]; then
result="True"
else
result="Not set."
fi
fi
echo "<result>$result</result>"