I'm assuming you're trying to do an "on tabcomp" script?

There's an easy way to do it with on tabcomp.

Code:
on *:TABCOMP:*:{
  var %a = $active , %pos = $editbox(%a).selend - 1 , %z = $left($1-,%pos)
  var %word = $gettok(%z,$gettok(%z,0,32),32)
  echo -ag %word
}


Just an example. Doesn't contain any error checking.

Otherwise,

Code:
alias tehword {
  if ($0 > 2) {
    var %letter = $1 , %num = $2 , %text = $3-
    var %pos = $pos(%text,%letter,%num)
    var %word = $gettok($left(%text,%pos),0,32)
    var %word = $gettok(%text,%word,32)
    $iif($isid,return,echo -ag) %word
  }
}


/tehword <letter> <number> <text>

/tehword o 1 This is just an example. So you can see how this works.
Returns: "So"

Changing 1 to 2 returns: you
Changing 2 to 3 returns: how
Changing 3 to 4 returns: works.