mIRC Home    About    Download    Register    News    Help

Print Thread
#11135 15/02/03 02:44 AM
Joined: Dec 2002
Posts: 60
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2002
Posts: 60
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?

Joined: Dec 2002
Posts: 332
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
did you try using $chr(91) [ and $chr(93) ]

Joined: Dec 2002
Posts: 60
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2002
Posts: 60
the backets are in the text files not part of the script

Joined: Dec 2002
Posts: 332
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
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

Joined: Dec 2002
Posts: 60
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2002
Posts: 60
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)
        }
      }

Last edited by Hammer; 15/02/03 07:41 AM.
Joined: Dec 2002
Posts: 27
B
Ameglian cow
Offline
Ameglian cow
B
Joined: Dec 2002
Posts: 27
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
}

Joined: Dec 2002
Posts: 60
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2002
Posts: 60
Thanks


Link Copied to Clipboard