alias short {
var %u $iif($1,$1,$?="What link do you want to short?"), %comName getSource. $+ $ticks
.comopen %comName msxml2.xmlhttp
noop $com(%comName,Open,1,bstr,GET,bstr,$+(http://shortn.us/?url=,%u),bool,false)
noop $com(%comName,Send,1)
noop $com(%comName,ResponseText,2)
noop $regex(shorten, $com(%comName).result, /(?s)<h2>Shortened URL by (.+?)<\/h2>.*?<input id="copylink" .+? value="(.+?)" \/>/Si)
.comclose %comName
echo -a Shortened link: $regml(shorten, 2) $chr(124) Shortened by $regml(shorten, 1)
clipboard $regml(shorten, 2)
}
I found this script http://www.hawkee.com/snippet/8312/ or shortened :P http://shortn.us/31 that works exactly like I'd want mine to, with the exception of using rly.cc instead of shortn.us