BlueSense AppleScripts

How to change the Skype Status to ONLINE in AppleScript

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


script SkypeStatusOnline
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 AWAY" then
					send command "SET USERSTATUS ONLINE" script name "BlueSense"
				end if
			end tell
		end if
	end tell
on error errString number errorNumber
	log (errString)
end try
end script