Old 18th May 2012, 11:19   #1
ehsansad
Junior Member
 
Join Date: Apr 2012
Posts: 22
FileSeek problem

Hello,
According to the manual if you use FileSeek as so
FileSeek $9 0 END

The file pointer will be pointing to the end of the file. Now I have the following code
code:

FileOpen $9 "start_all.cmd" a
FileSeek $9 0 END
FileWrite $9 "call e-xmi $SlotNameState start$\r$\n"
FileClose $9



I assumed that this will add a line to the file, which is not true. The code is appending to the file, but it is also erasing the provious
code:
"call e-xmi $SlotNameState start
line. so after running it say 4 time I will have the header of the file, six lines of text, and the last call.

any ideas why this is happeneing?

cheers,
Ehsan
ehsansad is offline   Reply With Quote
Old 18th May 2012, 15:25   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Working fine for me. What version of NSIS? What character encoding is the file using?

Stu
Afrow UK is offline   Reply With Quote
Old 21st May 2012, 08:10   #3
ehsansad
Junior Member
 
Join Date: Apr 2012
Posts: 22
Sorry, bad friday. I had forgotten that I'm creating the folder for the file, just had to check if the folder exists
DirState $dir -1 ...

thanks.
ehsansad is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump