Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

command typed?

Apr
22
0
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
 
Well, want to vary what happens to pc on startup based on whether human is there using it or not. John
 
Just demand a response and time out if not received. INKEY and QUERYBOX are your best candidates.

And yes, it is a variant of the "dead man's switch" used in locomotives.
 
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
 
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".
 
Um, webcam and facial recognition software? Yeah, I enjoyed Crytonomicon too.
 
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
 
It's easy enough to count the commands that are entered in a session -- see the PRE_EXEC alias, for example -- but I'm not at all clear on what it is that you're trying to do.
 
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
 
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
 

Similar threads

Back
Top