BlueSense AppleScripts

How to disconnect Mac OS X session in AppleScript

This script qui automatically the current user session on Mac OS X.

Note that if the app loose your device signal, you will be disconnected…


script DisconnectSession
    try
        do shell script ("/System/Library/CoreServices/Menu\\ Extras/User.menu/Contents/Resources/CGSession -suspend")
    end try
end script