Hi Allen.

I tried the above but cant get it to work yet,

i pasted Function
 Code:
Function WriteLog2($File, $Text, optional $TimeStamp)
   ;ACTION: Writes text to a specified log file.
   dim $RC, $File, $text, $FH, $TimeStamp
   $FH=1
   $RC=Open ($FH, $File, 5)
   while $RC = -3
      $FH=$FH +1
      $RC=Open ($FH, $File, 5)
   Loop
   Select
      Case $RC=0
            if ($TimeStamp=1)
               $TimeStamp = @Date + " " + @Time + " - "
            else
               $TimeStamp = ""
            endif
            $RC=Writeline ($FH, $TimeStamp + $Text + @CRLF)
            $RC=Close ($FH)
      Case $RC=-2
         $text = WriteLog2 ("junk.txt","This is a test",1)
: Invalid file handle ($FH) specified when trying to Open $File."
         $RC=MessageBox ($text,"Script Error",48)
      Case $RC=-1
         $text = "WriteLog2 ("junk1.txt","This is a test",1): Invalid file name ($File) specified for log file."
         $RC=MessageBox ($text,"Script Error",48)
      Case $RC=>0
         $text = "System Error($RC) while attempting to open log file ($File)."
         $RC=MessageBox ($text,"Script Error",48)
   Endselect
EndFunction

its actually now not even running the login script. lol.


Edited by Mart (2011-07-06 09:23 AM)
Edit Reason: Please use code tags when posting code.