Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 4:27 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Check whether "WriteLine" was succesful?
PostPosted: August 27th, 2012, 8:54 am 
Offline

Joined: August 26th, 2011, 10:51 pm
Posts: 8
Opus: 7
OS: Ubuntu / Windows
Hi,

the function "WriteRegistryValue" returns whether the value was written or not. Is it similarly possible to find out whether a string was succesfully written to a text file when you use the "WriteLine" function? I'd like to write to files on disk shared on a network, but I have to make sure that everything is correctly saved. I've thought about solving this with a script, but I can't really think of a good way of doing it.

Thanks in advance!

Arnoud


For this message arnoud999 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Check whether "WriteLine" was succesful?
PostPosted: August 29th, 2012, 2:10 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Is this something you could do with INI files? Or, more extreme, use a database or PHP?

mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Check whether "WriteLine" was succesful?
PostPosted: August 29th, 2012, 2:23 pm 
Offline

Joined: August 26th, 2011, 10:51 pm
Posts: 8
Opus: 7
OS: Ubuntu / Windows
I'm not familiar enough with PHP to try that out, and I think a disadvantage of using databases is that there has to be a database file already in the location you want to save to (right?), as opposed to text files, where Opus will automatically create one if there is none.

I'll have a look at INI files though, that might help me. Thanks!

Arnoud


For this message arnoud999 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Check whether "WriteLine" was succesful?
PostPosted: September 2nd, 2012, 4:05 pm 
Offline

Joined: August 26th, 2011, 10:51 pm
Posts: 8
Opus: 7
OS: Ubuntu / Windows
I solved the problem using INI files :). For anyone interested, this is the code I use now:

Code:
function saveline(loc,index,string)
//Save a line of data (string) to a data file with name loc (in location saveloc1), in section index.
   {
   while (check==false)
      {
      check = SetINIFileData(saveloc1 + "\\" + loc, "Data", index, "   " + string)
      }
   check = false
   }


Thanks a lot for your help, Mack!


For this message arnoud999 has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 32 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group