BlueSense AppleScripts

How to change the Skype Status to AWAY in AppleScript

Change the status of Skype to AWAY (if ONLINE and running).


script SkypeStatusAway
try
	tell application "System Events"
		if (exists process "Skype") then
			tell application "Skype"
				send command "GET USERSTATUS" script name "BlueSense"
				set lestatut to the result
				if lestatut is "USERSTATUS ONLINE" then
					send command "SET USERSTATUS AWAY" script name "BlueSense"
				end if
			end tell
		end if
	end tell
on error errString number errorNumber
	log (errString)
end try
end script