mIRC Home    About    Download    Register    News    Help

Print Thread
#186136 17/09/07 11:30 PM
S
swgiant
swgiant
S
Code:
alias tryto {
  .window -l @test | var %a = $findfile(C:\,*.htm*,@test)
}
alias try2 {
  .window -l @found | .window -lh @path | var %ticks $ticks | var %e 1 | while (%e <= $line(@test,0)) {
    if (!$crc($line(@test,%e))) { inc %e }
    else {
      bread $shortfn($line(@test,%e)) 1 $file($line(@test,%e)) &a | var %a = $bfind(&a,1,error) | if %a { aline @found $bvar(&a,%a,64).text | .aline @path $line(@test,%e) }
      inc %e
    }
  }
  echo -a $calc(($ticks - %ticks) /1000)
}
menu @found {
  $nopath($line(@path,$sline($active,1).ln)) 
  ..Open File { .run $line(@path,$sline($active,1).ln) }
  ..-
  ..Open Dir { .run $nofile($line(@path,$sline($active,1).ln)) }
  -
  Close { .close -@ @path @found }
} 

- sometimes, it will return an error msg: * /bread: invalid parameters (line 8, script1)

- I use crc to check the validity of file. If crc of certain file returns null, then it is locked. So far, i only knows a way and it is damn not accuracy and any better way to check it, maybe $com...

It return the search string but start from the position 1 of "error", then how to make it to return the whole line of search string and highlight "error" as a red color?

Another question is, how to make the file to highlight itself when open the file's directory?

I know it is badly scripted so please help me to fix it. the codes just for my own purpose use. thanks...

Last edited by swgiant; 17/09/07 11:48 PM.
#186141 18/09/07 01:27 AM
S
swgiant
swgiant
S
there is another problem, when more than 1 "error" string is found within a file, the script only capable to return the first found of string and onwards are duplicated, then how to fix it?


Link Copied to Clipboard