Jump to content

Recommended Posts

Posted

Hi and thanks fo reading this.

i have a number of scripts ( for exapmle 5)

i whant to record how many times each script has been opened ( like a statistic)

example:

script1 - 3

script2 - 1

script3 - 6

script4 - 0

script5 - 8

and i whant to make a script that display me the result.

Posted

Write a logging routine into each script to write to a log file.

Either increment the number found in the log file each time, or simply add some other details each time e.g. PC name, date / time, user etc.

Write a final script that will parse this log file and display it in a nice way for you.

Hows that for an idea?

----[ SandyD ]---
Posted

thx.

i solve this problem with a some sql commands

now i whant to to something else:

let`s supose that a script nr 1 remain opened for 30 minutes one time , and for 15 minutes other time. how i make to sum all time that script was oppened? like 20 + 15 ?

Posted (edited)

You can get your scripts top write the date/time to your datebase when they opened, and when they closed, then simply do some aritmetic on the date/times.

Look for OnAutoItStart () and OnAutoItExit ()

You may have problems though if someone terminates the script unexpectedly though, as it wont run the OnAutoItExit () function and you wont have your end details.

Edited by sandyd
----[ SandyD ]---
Posted

  sandyd said:

You can get your scripts top write the date/time to your datebase when they opened, and when they closed, then simply do some aritmetic on the date/times.

Look for OnAutoItStart () and OnAutoItExit ()

You may have problems though if someone terminates the script unexpectedly though, as it wont run the OnAutoItExit () function and you wont have your end details.

ok

is a good idea but

if i start a scrip on 11 PM (23) and i stop it at 2 AM (2)..

if i do some aritmetic .. like end time - start time it will give me a negative result , in this case -21.

and i think this is the real problem :whistle:

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...