Well thats not what he asked for though. First letter of first word of each sentence, not first letter of every word. It may seem like an easy task, but it can actually get rather complex, for example, what is a "sentence"? What characters can it end with? ?!. most likely. But if you just go through and capitalize the first letter after a period, http://www.test.com becomes http://www.Test.Com, so that's not going to work correctly,
Code:
alias caps {
  var %i = $calc($len($1-) -1)
  var %out
  while (%i > 0) {
    if ($mid($1-,%i,1) == $chr(32) && $mid($1-,$calc(%i -1),1) isin .?!) {
      set %out $upper($mid($1-,$calc(%i +1),1)) $+ %out
    }
    else {
      set %out $mid($1-,$calc(%i +1),1) $+ %out
    }
    dec %i
  }
  set %out $upper($mid($1-,%i,1)) $+ %out
  return %out
}

$caps(this is a sentence. this is another sentence! this is a third sentence?) = This is a sentence. This is another sentence! This is a third sentence?

So that appears to work. But just a note, to prevent the stated problem on urls, it recognizes the end of a sentence as ". " "? " and "! " meaning if there is not a space after the punctuation, then it won't capitalize, it's not a bug, it is how I designed it.