Ok, just for that sake of others who may read this...

Code:

Function WriteNewLineAndDisplay($entry)
WriteAndDisplay(@CRLF + $entry)
EndFunction

Function WriteAndDisplay($entry)
$entry

DIM $freefilehandler
$freefilehandler = FreeFileHandle()

DIM $rc
$rc = Open($freefilehandler, @STARTDIR + "\Logs\" + @WKSTA + "-" + @USERID + ".log", 5)
$rc = WriteLine($freefilehandler, $entry)
$rc = Close($freefilehandler)
EndFunction



You can also handle file errors depending upon what you want to do, I don't care so havn't worried about it.

L.