mIRC Homepage
If I use
/writeini file.ini topic item
with no value, the command should remove the item in the file.ini.

If it doesn't do this, I need a if (value) { writeini... } and a else { remini... }
And if I forget it one time, my script gets buggy, because the editbox in the dialog cannot get empty.

Maybe adding a swith would help.
/writeini -r checks if there is a value. If not, it uses remini instead.
Well it's useful to have that error when the last parameter is missing to help catch coding problems. For your purposes you can use "" for the last parameter instead. This will actually insert "" into the INI file but surrounding quotes are ignored by $readini().

Code:
/writeini file.ini topic item $qt(value)

should work fine.

Use $+(",value,") instead of $qt(value) if you need to support mIRC versions older than 6.17.
You could script your own "routine" for this purpose, like:
Code:
alias pushini {
  if ($3) {
    $iif((!$4),remini,writeini) $1-
  }
}

/pushini file.ini topic item [data]
© mIRC Discussion Forums