logout after specific time period

Discussion about Code Builder Builder and Winlog language support.
Post Reply
User avatar
admin
Site Admin
Posts: 373
Joined: Tue Nov 17, 2009 1:18 pm

Re: logout after specific time period

Post by admin »

Dear Sir,
you can use this code:

Code: Select all

Function void mainLoopCheckActivity()
#startup

    while (WindowIsOpen())

        // If no activity for 2 -> user logout
        if ((GetUserName() != "") && (GetUserInactivityTime() > 120)) then
            Logout();
        end

        Sleep(1000);
    end
end
Best regards
Post Reply