huldu Posted November 29, 2006 Share Posted November 29, 2006 Hi Im having problems with FileWrite to work in my script, sometimes i get it to work one time, then it stops work. Its so random, just no idea whats wrong. The idea behind this script (will be GUI when im done), is to check if your connection is working. Everytime connection drops, it will log the time when it dropped, and log the time when the connection was resumed again. The script works fairly well atm, just that the FileWrite isnt working too well. Hope someone can help me clear this mess out test3.au3 "I'm paper, rock is fine, nerf scissors!!!" Link to comment Share on other sites More sharing options...
Developers Jos Posted November 29, 2006 Developers Share Posted November 29, 2006 HiIm having problems with FileWrite to work in my script, sometimes i get it to work one time, then it stops work. Its so random, just no idea whats wrong.The idea behind this script (will be GUI when im done), is to check if your connection is working. Everytime connection drops, it will log the time when it dropped, and log the time when the connection was resumed again.The script works fairly well atm, just that the FileWrite isnt working too well.Hope someone can help me clear this mess out shouldn't this:$file = FileOpen(@scriptdir & "log.txt", 1)be $file = FileOpen(@scriptdir & "\log.txt", 1)? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
huldu Posted November 29, 2006 Author Share Posted November 29, 2006 shouldn't this:$file = FileOpen(@scriptdir & "log.txt", 1)be $file = FileOpen(@scriptdir & "\log.txt", 1)?I tried using the \ but had the same result, so i never did anything about it. Again i added the \ but its the same thing, just wont work. "I'm paper, rock is fine, nerf scissors!!!" Link to comment Share on other sites More sharing options...
Developers Jos Posted November 29, 2006 Developers Share Posted November 29, 2006 I tried using the \ but had the same result, so i never did anything about it. Again i added the \ but its the same thing, just wont work.can you be more explicit on what doesn't work ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
huldu Posted November 29, 2006 Author Share Posted November 29, 2006 Just did some more testing and this is what i found out sofar. The info ONLY writes to log when i exit the script!. Why is it this way? it wont save anything during the run of the script! "I'm paper, rock is fine, nerf scissors!!!" Link to comment Share on other sites More sharing options...
Developers Jos Posted November 29, 2006 Developers Share Posted November 29, 2006 (edited) Just did some more testing and this is what i found out sofar.The info ONLY writes to log when i exit the script!. Why is it this way? it wont save anything during the run of the script!ok... you don't close the file after writing so you cannot use the file till you do so,...Just skip the fileopen and change the filewrite to use the filename ... Edited November 29, 2006 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
huldu Posted November 29, 2006 Author Share Posted November 29, 2006 ok... you don't close the file after writing so you cannot use the file till you do so,...Just skip the fileopen and change the filewrite to use the filename ...Thanks!I changed the FileWrite thing to FileWrite(@scriptdir & "\log.txt") and now it writes to file in realtime. "I'm paper, rock is fine, nerf scissors!!!" Link to comment Share on other sites More sharing options...
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