mikeytown2 Posted May 21, 2005 Posted May 21, 2005 (edited) This makes a log file of the log file... the file stored on the printer only holds 22 entries, so this makes one big log file of all the entries on your c drive.If you want to test it out here is a live address of a dell laser printer i found on googlehttp://146.6.127.19/ews/job/log.htmThis script is tested only on a 3000, the link is for a 5100expandcollapse popup;#NoTrayIcon #include <file.au3> $temp = 0 Do InetGet("http://192.168.2.3/ews/job/log.htm", "C:\templog.html") $file = FileOpen("C:\templog.html", 0) $lineNum = 72 $prtlog = FileOpen("C:\printlog.html", 0) If $prtlog = -1 Then FileClose($prtlog) $prtlog = FileOpen("C:\printlog.html", 1) $bar = 0 While 1 $line = FileReadLine($file) $bar = $bar + 1 If $bar < 47 Then ContinueLoop FileWriteLine($prtlog, $line) If $bar > 71 Then FileClose($prtlog) FileOpen("C:\printlog.html", 0) ExitLoop EndIf WEnd MsgBox(0, "Dell3000", "Print Log Located At C:\printlog.html", 60) EndIf $lines = 0 $count = -1 While 1 $line = FileReadLine($prtlog) $lines = $lines + 1 If @error = -1 Then ExitLoop WEnd $lines = $lines - 1 $prtline = FileReadLine($prtlog, $lines) $prtread = StringSplit($prtline, "<tr><td>", 1) $prtnum = StringSplit($prtread[2], "</td><td>", 1) Do $line = FileReadLine($file, $lineNum) $read = StringSplit($line, "<tr><td>", 1) $num = StringSplit($read[2], "</td><td>", 1) $lineNum = $lineNum - 1 $count = $count + 1 If $count = 20 Then ExitLoop EndIf Until $num[1] = $prtnum[1] FileClose($prtlog) $lineNum = 73 - $count If $count > 0 Then $prtlog = FileOpen("C:\printlog.html", 1) MsgBox(0, "Dell3000", "New Print Completed", 60) Do $line = FileReadLine($file, $lineNum) FileWriteLine($prtlog, $line) $lineNum = $lineNum + 1 Until $lineNum = 73 FileClose($prtlog) EndIf FileClose($file) FileDelete("C:\templog.html") Sleep(90000) Until $temp = 1I commented out the no tray to post, but I run this at startup so I don't want to see it. it runs 24/7 on my computer.Tell me what you think.-Mike Edited December 12, 2007 by mikeytown2 Email: POP3 & SMTP using SSL/TLS (OpenSSL)Email: IMAPEmail: Base64 & SMTP login & Send email direct to MX Server (thanks blindwig)Win: Hook Registry ChangesWin: Read/Write to Alternate Data Streams (ini example)Utility: GPS Distance Calculations, Vincenty and Haversine formulas; angles and elevationUtility: Dell Laser Printer (3000-5100) - Print LoggerUtility: Reset Router when Wireless Link FailsUtility: ImageMagick Batch jpg ProcessorVideo HCenc Batch FrontendVideo: *DEAD* YouTube Video Encoder (avs/avi to flv)Software On CD's I Like<<back|track3 Ultimate Boot CD for Windows SpinRite Ubuntu ophcrack
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