Re: Network file locking

"valery_vi" <[email protected]>
Newsgroups gmane.comp.windows.autoit.user
Message-ID <[email protected]>
Maybe operation with INI-file will be more safe with check of result:

So, write trial like

IniWrite ( "filename", "section", "key", "value" )

should be as follows

while Not IniWrite ( "filename", "section", "key", "value" )
 sleep(100)
wend

and read trial like

IniRead ( "filename", "section", "key", "default" )

should be as follows

while IniRead ( "filename", "section", "key", "default" ) == "default"
 sleep(100)
wend

Doing this you can break possible problems, I think 

Valery

--- In [email protected], "pvhoof" <pvhoof@...> wrote:
>
> Hi all,
> 
> I have written an Autoit script to generate reports and keep a list 
of 
> the 10 most recent reports in an ini file.
> 
> Now the need arrises that more than one of these programs runs on a 
> network and they should all update the same ini file (or another 
> solution that has the same result)
> 
> I dont want to run the risk of multiple programs writing at the 
same 
> time trashing the file or the contents of the list
> 
> There doesn't seem to be a way to lock a file in autoit, does 
anyone 
> have a good solution?
> 
> Thanks in advance
> Peter van Hoof
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.