fox_91 Posted March 12, 2006 Posted March 12, 2006 Im having a heck of a time trying to match timestamps on a spybot log when i am trying to copy them to my own log file for a script. for people who don't know the spybot logs are made one at the time of checking, and one at time of fixing of spyware. they follow this format "Checks."&Stringright(@YEAR, 2)&@MON&@MDAY&"-"&@HOUR&@MIN&".log" or Checks.060312-0611.log below is my code for generating tis filename, which the name it generates is fine, but i can't match the time up right with the running of the program $hr = @HOUR $min = @MIN $sec = @SEC if (@SEC >= 55) Then sleep(6000) $sec = @SEC EndIf $spybotFoundName = "Checks."&Stringright(@YEAR, 2)&@MON&@MDAY&"-"&@HOUR&@MIN&".log" RunWait(Quote($spyware) & ' /autoupdate /autocheck /autofix /autoclose /autoimmunize /taskbarhide') later in the code i try to catch if the filename is wrong and try to adjust the time to match the file name ;catch low $catch = 0 while ($test > 0 and $catch < 10000000) if not fileexists($spybotlogpath & $spybotFoundName) Then $newtime=_timetoticks($hr, $min, $sec) $newtime=$newtime-10000 $catch = $catch+10000 _tickstotime($newtime,$hr,$min,$sec) $spybotFoundName = "Checks."&Stringright(@YEAR, 2)&@MON&@MDAY&"-"&$hr&$min&".log" ;msgbox(1,"test",$newtime) ;msgbox(1,"time",$spybotFoundName) Else $test = 0 Endif WEnd ;catch high $catch = 0 while ($test > 0 and $catch < 20000000) if not fileexists($spybotlogpath & $spybotFoundName) Then $newtime=_timetoticks($hr, $min, $sec) $newtime=$newtime+10000 $catch = $catch+10000 _tickstotime($newtime,$hr,$min,$sec) $spybotFoundName = "Checks."&Stringright(@YEAR, 2)&@MON&@MDAY&"-"&$hr&$min&".log" ;msgbox(1,"test",$newtime) ;msgbox(1,"time",$spybotFoundName) Else $test = 0 Endif WEnd i would say i have about a 1 out of 10 success rate of hitting the file name right even if i am incrementing the minutes above or below where it should catch on the file name..... i was wondering if anyone could maybe offer some insight on to why i can't match the files. i also have a dumb question... what command would i use to open a html file that is stored localy on my machine, i know if i use the run box and type iexplorer (html file) i can open it, but what would i use in autoit to open the file? thanks for helping
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