So, here's my problem: My script is running as Windows service and must every second or so get idle time of a specific user logged on via Remote Desktop. I didn't have any problem getting current user's idle time (in this case, the "current user" is SYSTEM), however I found getting another user's idle time to be very difficult. I imagine one way would be to write output of "query user" to a file and read from it, but I'd really like to avoid unnecessary writing on disk. Another way would be to run a separate script in each user's context and program it to report idle time back to the main script. I don't like this option too - too messy, too many unnecessary processes running. I found this interesting and 90% undocumented function named WinStationQueryInformationW. Here someone got the results I want from it, but it's written in C... I tried to "translate" that into AutoIT language, but I don't really have enough knownledge in this area. Is there anybody out there who could help me to make use of that function? I'm also looking for alternatives...