I was wondering how mIRC writes to files, in this case, .ini files specifically. It seems that it takes a while for mIRC to catch up, which I found out because of the script I'm writing.
What it does is:
- loop through files to load;
- load each file;
- send signal -n to loaded file to initialize (immeditately)
when the file recieves the signal, it checks if the configuration for that file exists. If it doesn't, it will generate defaults, and then send a signal -n to itself to re-initialize.
What's supposed to happen, is that it re-checks if the file exists, which is now the case, and then load the settings from them into a hashtable.
However, it seems that mIRC will repeatedly generate the defaults, as checking if the file exists fails. This goes both for $exists() and $file().
The solution I have right now is to insert a pause of 500ms (by using whilefix) and then sending the initialize signal again. At that point the file check doesn't fail.
Just curious how/why this is. :_)
EDIT: I should probably mention that I don't recall having this issue with 6.35, although there might be various reasons for that. It just seems that writeini is delayed in general.
Last edited by Knoeki; 25/08/10 02:21 AM.