Although its not a bad idea, personally i'd use something like.
alias f12 {
var %m, %n, %i = $url(0), %t = $gettok($editbox($active),-1,32)
while (%i) {
if ($+(%t,*) iswm $url(%i)) { var %m = $url(%i) | inc %n 1 }
dec %i
}
if ((%n == 1) && (%m)) { editbox $reptok($editbox($active),$gettok($editbox($active),-1,32),%m,1,32) }
}
Examples, include, adding the following;
/url -i ?
http://url-1.com URL-1
/url -i ?
http://url-2.com URL-2
/url -i ?
http://url-3.com URL-3
in the editbox, type
http://url- then hit F12, nothing happens since theres multiple urls but i suppose you could have it pick one.
type
http://url-2 then hit F12 it replaces it with url-2.com.
Not ideal, but workable i suppose.
Eamonn.