Dear,

We have create also a script which is using a general file on your server.
Each time it will read the previous logon information.
The result will be the variable $run_full_script, which will set to
"no" by a new logging on within 5 minutes.

You may modify the value of variable $log_file to another location
on your server.
Our script.

code:

:script_logging
$log_file="c:\last_logon.txt"

$time_previous=ReadProfileString($log_file,"logon",@userid) ; - @date @time @wksta -
$time_current=@date+" "+@time+" "+@wksta
IF (WriteProfileString($log_file,"logon",@userid,$time_current) <> 0)
? "Error UpdateLogonInfo @error: @serror"
ENDIF
;
$run_full_script="yes"
IF (len($time_previous) <> 0)
$time_previous=60*Val(substr($time_previous,12,2))+Val(substr($time_previous,15,2))
$time_current=60*Val(substr($time_current,12,2))+Val(substr($time_current,15,2))
IF (substr($time_previous,1,10) = substr($time_current,1,10)) ; - same day? -
$time_period=$time_current-$time_previous
ELSE
$time_period=$time_current+(24*60-$time_previous)
ENDIF
IF ($time_period < 5)
$run_full_script="no"
ELSE
$run_full_script="yes"
ENDIF
ENDIF
;
? "run full script: "+$run_full_script+" (previous logon: "+$time_period+")"
IF ($run_full_script = "yes")
;
; - your code -
;
ENDIF

EXIT


The $log_file can contain following information:

code:

[logon]
MCA=2001/07/19 00:07:37 W2K
User1=2001/07/19 00:27:32 W95
User2=2001/07/19 00:17:35 NT4


Greetings.

[ 19 July 2001: Message edited by: MCA ]

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA