mIRC Homepage
Posted By: Om3n /writeini auto strips ? - 20/09/03 09:24 AM
Ok here is my code so you can see what i am doing... What seems to be the problem is that writeini is automatically stripping the text as it write to the ini file. My question is, assuming my code if all fine of corse, is there a way around this? I need to be able to use bold and the ctrl+o.

dialog code :: edit "", 32, 52 20 82 17, tab 4 multi autovs limit 110
within the dialog init sequence :: did -ra $dname 32 $rls.set(test)
within the dialog sclick function for saving settings ::
Code:
      if ($did($dname,32).text != $null) {
        var %x = 1,%text
        while (%x <= $did($dname,32).lines) {
          set %text %text $did($dname,32,%x).text
          inc %x
        }
        writeini $script pref test %text | echo %text
      }


It echo' the %text correctly and it will load any text formatting into the dialog if i manually edit the ini file and put it there.
Posted By: theRat Re: /writeini auto strips ? - 20/09/03 09:46 AM
.ini files doesn't support control codes, $replace them to something
Posted By: pheonix Re: /writeini auto strips ? - 20/09/03 02:35 PM
also, not really relevant but:

if ($did($dname,32).text) {
works the same as:
if ($did($dname,32).text != $null) {
except:
if ($did($dname,32).text) {
classes '0' as $null
Posted By: Om3n Re: /writeini auto strips ? - 20/09/03 08:44 PM
oh i see, thanks, yeah ill just use a replace on write and read

and i know some of the code is useless hehe, i optimize segments after they are all working how i want : )
© mIRC Discussion Forums