erikson Posted March 26, 2007 Posted March 26, 2007 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.
sandyd Posted March 26, 2007 Posted March 26, 2007 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 ]---
Uten Posted March 26, 2007 Posted March 26, 2007 (edited) Take a look at the Reg* or Ini* functions in the help file. Increment a variable with one of those. Edited March 26, 2007 by Uten Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling
erikson Posted March 26, 2007 Author Posted March 26, 2007 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 ?
sandyd Posted March 26, 2007 Posted March 26, 2007 (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 March 26, 2007 by sandyd ----[ SandyD ]---
erikson Posted March 26, 2007 Author Posted March 26, 2007 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.okis a good idea butif 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
sandyd Posted March 26, 2007 Posted March 26, 2007 lookup the _DateDiff function, it will work that out for you ... ----[ SandyD ]---
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now