hey, I wrote this script to read several files, and output the text to a channel. here is the script (alias FAHREAD is at line 4):
Code:
alias FAHREAD {
  scid 1 {
    if ($status != connected) {
      halt
      }   if (%udaline > %udaline.bak) {
      set %udaline %udaline.bak
    }
    set %udanumlines $lines(D:\program files\UD monitor\UDm Logs\Log.txt)
    if (%udaline > %udanumlines) {
      set %udaline 0
    }
    if (%udaline < %udanumlines) {
      if (%udaline < %udanumlines) {
        inc %udaline 
        msg #ubergeeks $read(D:\program files\UD monitor\UDm Logs\Log.txt,%udaline)
      }
    }
    if (%wuline > %wuline.bak) {
      set %wuline %wuline.bak
    }
    set %wunumlines $lines(D:\program files\UD Monitor\UDm Logs\WUs.txt)
    if (%wuline > %wunumlines) {
      set %wuline 0
    }
    if (%wuline < %wunumlines) {
      while (%wuline < %wunumlines) {
        inc %wuline
        msg #ubergeeks $read(D:\program files\UD monitor\UDm Logs\WUs.txt,%wuline)
      }
    }
    set %fahnumlines $lines(D:\program files\folding@home\FAHlog.txt)
    if (%fahline > %fahline.bak) {
      set %fahline %fahline.bak
    }
    if (%fahline > %fahnumlines) { 
      set %fahline 0
    }
    if (%fahline < %fahnumlines) {
      if ($calc(%fahnumlines - %fahline) < 6) {
        while (%fahline < %fahnumlines) {
          inc %fahline
          while ($remove($read(D:\program files\folding@home\FAHlog.txt,%fahline),$chr(35)) == $null) {
            inc %fahline
          }
          msg #ubergeeks $remove($read(D:\program files\folding@home\FAHlog.txt,%fahline),$chr(35))
        }
      }
      else { 
        inc %fahline
        while ($remove($read(D:\program files\folding@home\FAHlog.txt,%fahline),$chr(35)) == $null) {
          inc %fahline
        }
        msg #ubergeeks $remove($read(D:\program files\folding@home\FAHlog.txt,%fahline),$chr(35))
      }
    }
  }
  set %fahline.bak %fahline
  set %udaline.bak %udaline
  set %wuline.bak %wuline
}
this occaisonally locks up mIRC, I have to use ctrl+break to recover. after the script stops, mIRC indicates the script was stopped at line 45 and the script runs normally. it's locked up several times, enough for me to be writing this post. the FAH log looks something like this(the line that the script locked was either 10, or 11. I'm not sure.
Quote:
[03:42:14] Folding@home Core Shutdown: FINISHED_UNIT
[03:42:17] CoreStatus = 64 (100)
[03:42:17] Sending work to server
[Intentionally Left Blank]
[ILB]
[03:42:18] + Attempting to send results
[03:56:57] + Results successfully sent
[03:56:57] Thank you for your contribution to Folding@Home.
[03:56:57] + Number of Units Completed: 180
[ILB]
[03:57:13] - Preparing to get new work unit...
[03:57:13] + Attempting to get work packet
[03:57:13] - Connecting to assignment server
[03:59:07] - Successful: assigned to (171.64.65.58).
[03:59:07] + News From Folding@Home: Welcome to Folding@Home

this is what was output to the channel, both before the script locked up, and after
[20070316204216] <~igor> [03:42:14] Folding@home Core Shutdown: FINISHED_UNIT
[20070316204218] <~igor> [03:42:17] CoreStatus = 64 (100)
[20070316204218] <~igor> [03:42:17] Sending work to server
[20070316204218] <~igor> [03:42:18] + Attempting to send results
[20070316204846] <~igor> 2007.0316 20.48.46: #2: Save (+ 0.32.15)
[20070316205658] <~igor> [03:56:57] + Results successfully sent
[20070316205658] <~igor> [03:56:57] Thank you for your contribution to Folding@Home.
[20070316205658] <~igor> [03:56:57] + Number of Units Completed: 180
* Break: command halted (line 45, script1.ini)
[20070316213915] Closing Link: igor[fish.net] (Ping timeout)
[20070316213915] * Disconnected
[20070316213920] * Connect retry #1 zirc.org (6668)
[20070316213925] * Attempting to rejoin channel #ubergeeks
[20070316213928] * Rejoined channel #ubergeeks
[20070316213928] * ChanServ changes topic to 'Folding@Home log output channel (igor)'
[20070316213928] * ChanServ sets mode: +ntroq igor igor
[20070316213929] <~igor> [03:56:57] + Results successfully sent
[20070316213932] <~igor> [03:56:57] Thank you for your contribution to Folding@Home.
[20070316213935] <~igor> [03:56:57] + Number of Units Completed: 180
[20070316213937] <~igor> [03:57:13] - Preparing to get new work unit...
[20070316213939] <~igor> [03:57:13] + Attempting to get work packet
[20070316213941] <~igor> [03:57:13] - Connecting to assignment server
[20070316213943] <~igor> [03:59:07] - Successful: assigned to (171.64.65.58).
[20070316213945] <~igor> [03:59:07] + News From Folding@Home: Welcome to Folding@Home