hello ppl,

okay first off i'm trying to mod a script that Online had done to fit my needs.. and what i'm trying to do with this atm is to call a trigger from an ini file by matching it's root directory with a directory thats stored in a txt file.
example of .ini file:
[Fserve.5]
Access.Op=
Access.Voice=
Access.Reg=
Status=
Auto.Start=
DCC.Watch=
Ad.Delay=
Note=
Trigger=
Root.Dir=
Welcome.File=
Channels=

all i want to do is pull the trigger from this when the search criteria fids a match.. i figured the best way to accomplish this is by the root dir..

here's what i have thus far..:
Code:
On *:load: find

#find off
On *:text:@find *:%find.chanlist:{
  window -h @@
  filter -fwn find_f.txt @@ $+(*,$2-,*)
  if !$filtered {
    msg # Sorry - No results!
    close -@ @@
    return
  }
  .msg $nick [4@Find Results] %excursion
  .msg $nick Found $filtered results. Listing...
  if $filtered > %find.max_results {
    dline @@ $calc(%find.max_results + 1) $+ -
    aline @@ Too many results. Please restrict your query.
  }
  aline @@ [Trigger] :
  savebuf @@ tmp
  close -@ @@
  play -a play_alias $nick tmp 500
  .remove tmp
}
#find end


alias find dlg find
alias dlg dialog $iif($dialog($1),-v,-m) $1 $1
alias -l trig.match { }

alias -l play_alias {
  if $2 isnum {
    tokenize 32 $1 $+([10,File:,]) $3- 

  }
  msg $1-
}
dialog find {
  title "@find script"
  size -1 -1 264 190
  option dbu
  check "Enabled", 3, 3 3 32 10
  box "Folders", 1, 44 1 147 52
  box "Files", 2, 2 53 189 132
  button "Add", 4, 163 8 25 10
  button "Del", 5, 163 19 25 10, disable
  button "Reload", 6, 163 40 25 10
  list 7, 47 8 113 48
  list 8, 5 60 183 129, extsel vsbar
  edit "", 9, 218 32 14 10
  box "Max Results", 10, 206 20 40 31
  combo 11, 199 71 57 50, sort
  box "@find Channels", 12, 195 61 66 64
  button "EXIT", 13, 208 173 37 12, ok
  button "ADD", 14, 204 127 20 10
  button "Remove", 15, 228 127 23 10
}

On *:dialog:find:init:0:{
  didtok $dname 11 44 %find.chanlist
  if (%find.max_results != $null) { did -a $dname 9 %find.max_results } 
  if $file(find_d.txt) { 
    loadbuf -o find 7 find_d.txt
    if $file(find_f.txt) {
      loadbuf -o find 8 find_f.txt
    }
  }
  if $group(#find) == on {
    did -c find 3
  }
}

On *:dialog:find:close:0:{
  savebuf -o $dname 7 find_d.txt
  savebuf -o $dname 8 find_f.txt
}

On *:dialog:find:sclick:*:{
  if $did == 3 {
    $iif($did(3).state,.enable,.disable) #find
  }
  if $did == 4 {
    if $sdir(\) {
      var %d = $ifmatch
      !.echo -q $findfile(%d,Thumbs.db,0, .remove -b $+(",$1-,") )
      if !$didwm(7,%d) { 
        did -a $dname 7 %d
        !.echo -q $findfile(%d,*,0,did -a $dname 8 $1- $bytes($file($1-),m).suf)
      }
    }
  }
  if $did == 5 {
    did -b $dname 5
    if $did(7).sel {
      filter -cxio $dname 8 $dname 8 $$did(7).seltext $+ *
      did -d $dname 7 $ifmatch 
    }
    else {
      if $did(8).sel { did -d $dname 8 $ifmatch }
    }
  }
  if $did == 6 {
    var %i = $did(7).lines
    did -r $dname 8
    while %i {
      !.echo -q $findfile($did(7,%i),*,0,did -a $dname 8 $1-)
      dec %i
    }
  }
  if $did == 7 { 
    did -e $dname 5
    var %l = $$didwm(8,$did(7).seltext $+ *)
    if %l > 21 { did -c $dname 8 $calc(%l + 21) }
    did -cf $dname 8 %l
  }
  if $did == 8 {
    did -e $dname 5
    did -u $dname 7
  }
  if $did == 14 { 
    if $did(11) {
      $left($did(11),1) isin $chantypes 
      if $did(11) != $null { 
        set %find.chanlist $addtok(%find.chanlist,$did(11),44)
        did -a $dname 11 $did(11) 
        did -d $dname 11 0  
      } 
    }
  }
  if $did == 15 {  
    if $did(11).seltext != $null { 
      set %find.chanlist $remtok(%find.chanlist,$did(11).seltext,1,44) 
      did -d $dname 11 $did(11).sel 
    } 
  }
}
on *:dialog:find:edit:*:{
  if ($did == 9) { .set %find.max_results $did($dname,9).text } 
}


if anyone has any suggestions.. please help..

thanks in advance