Nr31s Posted December 4, 2011 Posted December 4, 2011 Hi, i'm trying to make a script that generate a file every 30 seconds, but all it can do is create the first file and refresh it every 30 seconds. ; File Location $filepath = ".\" $filelogs = "Log\" $filepsc = "psc\" ; Filename $filename = @YDAY & @HOUR & @MSEC ; Extensions $logext = ".gtk" $pscext = " .jpg" ; Encrypt Password $cryptpwd = "test" ; Files Path $fullpath = $filepath & $filelogs & $filename & $logext $fullscr = $filepath & $filepsc & $filename $i = 0 While $i >= -1 _FileCreate($fullpath) FileWriteLine ($fullpath, _report()) _Crypt_DecryptFile($fullpath, $filepath & $filelogs & "_" & $filename & $logext, $cryptpwd, $CALG_RC4) FileDelete($fullpath) FileMove($filepath & $filelogs & "_" & $filename & $logext, $filepath & $filelogs & $filename & $logext) Sleep(30000) $i = $i + 1 WEnd Can someone help me to pass this obstacle? Appreciated all
enaiman Posted December 4, 2011 Posted December 4, 2011 $filename = @YDAY & @HOUR & @MSEC Needs to be inside the While loop. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
kylomas Posted December 5, 2011 Posted December 5, 2011 (edited) Nr31s,I really doubt that the file is refreshed every 30 seconds if this is all that is running. After the first run $i becomes 0 which is > -1. Assuming you get by that hurdle, follow enaiman's advice and generate a new filename at every iteration.Take another whack at it, if you need help, it's here!!Good Luck,kylomasEdit: belay that, still giddy from the Greenbay game...however, as written there is no way to break out of the while loop. Also, if the day, hour and millisec have no significance than consider using the UDF _tempfile() (see helpfile)... Edited December 5, 2011 by kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill
Blue_Drache Posted December 5, 2011 Posted December 5, 2011 what kind of crazy screenshotting keylogger are you writing? Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
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