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