command typed?

Apr 1, 2013
22
0
#1
There's got to be a way! - I want to detect when a system is attended eg set att=y if and only if someone typed something excluding commands in bat files.

Tried %_cmdline - doesn't help, the inbuilt pre and post exec aliases, and prompt.
Any ideas?

John
 
Apr 1, 2013
22
0
#6
thanks but that's the wrong way round & shows that noone is answering - I want something that checks if a command _has_ been entered ie someone _has_ used the PC. j
 
#7
The question you asked is "Well, want to vary what happens to pc on startup based on whether human is there using it or not". It was not "some time after startup I want to determine whether or not a person affected the computer".
 
Apr 1, 2013
22
0
#9
Oh come on - it isn't a philosophy q - I just want a way to detect whether someone has typed a command from startup onwards. So a flag that says 'someone has typed a command'. I'd thought of using %_cmdline somehow.
j
 
#11
Can LE use plugins? This was almost trivial. There's not much customizing it (except for the units) the Windows function GetLastInputInfo() gives only the tick count at the time of the last input.
Code:
l:\projects\4sysutils\release> help _lastinput
milliseconds since last input

l:\projects\4sysutils\release> do forever ( echo %_lastinput & delay 1)
16
999
2013
3027
4041
5055
6069
7083
 
#12
This seems a bit easier to use.
Code:
l:\projects\4sysutils\release> help _lastinput
seconds since last input

l:\projects\4sysutils\release> do forever ( echo %_lastinput & delay 10 )
0
10
20
30