Code does not send info into .CSV file sometimes

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
euras
Posts: 429
Joined: 05 Nov 2015, 12:56

Code does not send info into .CSV file sometimes

29 Mar 2017, 05:40

I have a strange issue. I have a code that sends information into .csv file that is on my desktop. Sometimes everything Works fine, sometimes I'm missing data for half day. AND after a while a part of data that was missed appears on my .csv file, but not all data, there is no data for first couple hours. It's very strange. I have no idea how to fix it? Maybe someone had experience With that or can show me a road?

Code: Select all

Sign := A_Username
entry=%One%;%Two%%Three%;Something here;%Four%

FileAppend, 
(
%entry%`r`n 
), C:\Users\%Sign%\Desktop\%Sign%.csv

Sleep 300
Guest

Re: Code does not send info into .CSV file sometimes

29 Mar 2017, 08:34

1 - You can simplify / short your code a bit like so but that won't be the cause I suspect

Code: Select all

entry=%One%;%Two%%Three%;Something here;%Four%`r`n
FileAppend, %entry%, %A_Desktop%\%A_Username%.csv
Sleep 300
2 - if no data is appended it is most likely the that script doesn't run. How do you run the script? Is it a SetTimer, hotkey, hotstring, startup etc. If the code above is part of a larger script it is most likely your script is "stuck" elsewhere it doesn't reach the FileAppend line. If you see that happening double click on the AutoHotkey tray icon and you should see the "lines most recently executed" or you can try to build in some additional logging at various other steps in your script so you can "see" what it did last before it stops writing to your CSV.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], RandomBoy, Rohwedder, ruespe and 381 guests