mIRC Homepage
Posted By: Cyber_Axe Evaluation ARG! ARG! ARG! - 15/02/03 02:44 AM
is there any way to stop mIRC using Evaluation brackets are least temporarily during a certain event or alias?

i have created a script for reading form one text and copying info that isnt in the main text to the main text but if there is a line in a text with a bit of text such as ; [ blah blah ] it uses the [] as evaluations and messes up what it is supposed to do is there anyway to stop this?
Posted By: Cheech Re: Evaluation ARG! ARG! ARG! - 15/02/03 02:46 AM
did you try using $chr(91) [ and $chr(93) ]
Posted By: Cyber_Axe Re: Evaluation ARG! ARG! ARG! - 15/02/03 02:49 AM
the backets are in the text files not part of the script
Posted By: Cheech Re: Evaluation ARG! ARG! ARG! - 15/02/03 02:56 AM
ic if you are using the $read in this script this might help you
If the n switch is specified then the line read in will not be evaluated and will be treated as plain text.

hope thats some help
Posted By: Cyber_Axe Re: Evaluation ARG! ARG! ARG! - 15/02/03 03:05 AM
it still dont work and ive even tried adding the t switch to all $read identifiers with no avail plus when it writes the text it removes any multiple spaces as well as the square brackets and thats removed in the $read it wasn't isnt matching some text it should be
Code:

alias cheatupdate {
  var %cs.cheat = "D:\Emulation\Arcade\Emulators\Mame 32\cheat.dat"
  var %cs.cheatu = "D:\Emulation\Arcade\Emulators\Mame 32\cheatu.dat"

  if ($exists(%cs.cheat) != $false) && $& 
    ($exists(%cs.cheatu) != $false) {
    var %cs.cheatulines = $lines(%cs.cheatu)
    var %cs.increase = 1

    write -i %cs.cheat

    while (%cs.increase <= %cs.cheatulines) {
      if ($read(%cs.cheatu,%cs.increase) != $null) {
        if (;* iswm $read(%cs.cheatu,%cs.increase)) && $&
          ($read(%cs.cheat,w,$read(%cs.cheatu,%cs.increase)) == $null) {
          write %cs.cheat $read(%cs.cheatu,%cs.increase)
        }
        elseif ($read(%cs.cheat,w,* $+ $&
          $+ * $+ $gettok($read(%cs.cheatu,%cs.increase),2,58) $&
          $+ * $+ $gettok($read(%cs.cheatu,%cs.increase),3,58) $&
          $+ * $+ $gettok($read(%cs.cheatu,%cs.increase),4,58) $&
          $+ * $+ $gettok($read(%cs.cheatu,%cs.increase),5,58) $+ *) == $null) {
          write %cs.cheat $read(%cs.cheatu,%cs.increase)
        }
      }
      else { 
        write -i %cs.cheat
      }      
      inc %cs.increase
    }
  }
}

The only bit that should need to be fixed is this bit
Code:

      if ($read(%cs.cheatu,%cs.increase) != $null) {
        if (;* iswm $read(%cs.cheatu,%cs.increase)) && $&
          ($read(%cs.cheat,w,$read(%cs.cheatu,%cs.increase)) == $null) {
          write %cs.cheat $read(%cs.cheatu,%cs.increase)
        }
      }
Posted By: BeeBeeGun Re: Evaluation ARG! ARG! ARG! - 15/02/03 06:21 AM
try something like :

Code:
  
var %l
while (%cs.increase <= %cs.cheatulines) {
  %l = $read(%cs.cheatu,n,%cs.increase)
  if (%l != $null) {
    if (;* iswm %l) && $&
       ($read(%cs.cheat,w,%l) == $null) {
      write %cs.cheat %l
    }
   elseif ($read(%cs.cheat,w, $&
                         * $+ $gettok(%l,2,58) $&
                        $+ * $+ $gettok(%l,3,58) $&
                        $+ * $+ $gettok(%l,4,58) $&
                        $+ * $+ $gettok(%l,5,58) $+ *) == $null) {
    write %cs.cheat %l
     }
  }
  else {
    write -i %cs.cheat
  }
inc %cs.increase
}
Posted By: Cyber_Axe Re: Evaluation ARG! ARG! ARG! - 15/02/03 10:59 AM
Thanks
© mIRC Discussion Forums