logout after specific time period

Discussion about Code Builder Builder and Winlog language support.
afeefabdussamed
Posts: 1
Joined: Mon Oct 16, 2017 6:25 am

logout after specific time period

Postby afeefabdussamed » Mon Oct 16, 2017 6:29 am

Dear all

How to logout automatic after specific time period

User avatar
admin
Site Admin
Posts: 322
Joined: Tue Nov 17, 2009 1:18 pm

Re: logout after specific time period

Postby admin » Mon Oct 16, 2017 3:32 pm

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


Return to “Code - Code Builder”

Who is online

Users browsing this forum: No registered users and 0 guests