|
|
#1 |
|
Junior Member
Join Date: Jul 2006
Posts: 9
|
Forcing reload/reread for ReadINIStr?
So far as I can tell, ReadINIStr loads the INI file into memory once, rather than re-reading the file each time its called. This is a sensible optimization.
However, is there any way to force the INI to be re-read, such as after the file is modified? |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
try FlushINI
|
|
|
|
|
|
#3 |
|
Member
Join Date: Jul 2006
Posts: 82
|
I tried FlushIni but didn't work.
I did this: The new data is recorded in a new ini or txt file, temporarily created or modified during the initials functions. Then, below in sections, I re-read the results from this temp text. But wait ! there is more and... FREE ! When you run the app again, in the start, before calling this ini file, Read the data from the temp file and write them in your defaut ini file. Nobody will knows, but works. I've been using this method and never failed yet. |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Jul 2006
Posts: 9
|
Mark -- Great idea. Now I copy the INI to a temp file, read it, and then delete the temp file. Works great.
GetTempFileName $R0 CopyFiles "my.ini" $R0 ReadINIStr $0 $R0 "My Section" "MyName" Delete $R0 Thanks for the tip! |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|