mIRC Home    About    Download    Register    News    Help

Print Thread
#213287 24/06/09 04:29 AM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline OP
Hoopy frood
OP Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
If a mIRC setting can be switched with a command but has no identifier to return it's current value/state - how to get it?

Thanks to "mirc.ini unleashed" creating a custom identifier is no problem. It's fine if you're after read-only settings.
My problem is that if the setting was changed per /command (and not the options dialogue), the new value is cached only, it's not updated in mirc.ini. My custtom identifier thus won't return the current state/value.
Apparently setting are flushed to mirc.ini only if you open the options dialogue and close it via "OK". "flushini $qt($mircini)" won't work...

To reproduce:
"/flood" will display the current flood protection settings. You can change them via "/flood on|off|<new values>". There's no $flood identifier. $gettok($readini($mircini,options,n5),18-22,44) would return the respective values, e.g. $gettok($readini($mircini,options,n5),18,44) for "enabled/disabled". But it's the "last flushed" values - not the current values - if they had been changed via the /flood command and not the options dialogue.

Do you know a method to flush mirc.ini (without sendkeys to open and confirm the options dialogue)?
I'd rather solve this with a weird workaround than request "yet another identifier/command", the uncertainties of "when" and "if" it'd be added put aside... smile

Thanks in advance.

Edit: for those interested in the sendkeys workaround I dislike:
Code:
alias flushmircini { .comopen x wscript.shell | .comclose x $com(x,sendkeys,3,*bstr,$(%o~,0)) }
but: mIRC has to be active app; $com may be $locked; and some settings may get messed up if by any chance the options dialog was already open (event, modeless dialogue,...) frown


Horstl #213289 24/06/09 05:21 AM
Joined: Mar 2006
Posts: 395
T
Pan-dimensional mouse
Offline
Pan-dimensional mouse
T
Joined: Mar 2006
Posts: 395
I'm about to run into this problem in the next few days, allthough admittedly, I probably would have overlooked it.

It'd be nice if mIRC would flush mirc.ini automatically.
Possibly even an event when settings are changed.
This would allow scripts to use the default mIRC settings more effeciently.


[02:16] * Titanic has quit IRC (Excess Flood)
Horstl #213331 25/06/09 12:36 AM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Originally Posted By: mirc.chm
/saveini
Updates all mIRC-related INI files with the current settings.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline OP
Hoopy frood
OP Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Gosh, I searched for mircini mirc.ini flush etc pp ...without success. The issue had been touched in some threads I found as well but remained unanswered... BIG thanks smile


Link Copied to Clipboard