I read that you can declare varables as global by not including the var infront of it, but when I do:
logFileName = "C:\\scripts\\testlog.txt";
writeLogLine("Hello");
function writeLogLine(msg)
{
var ForReading = 1, ForWriting = 2, ForAppending = 8;
var FTarget, File, MyDate, MyTime...