Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Better Version' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Better Version
Authored by: iacas on Jul 30, '02 06:23:07PM

Here's a better version that allows you to type "vt blah" or "vt 'blah blah'" (I aliased the script to "vt" in my shell). Anyway, it takes arguments from the CLI and doesn't force you to enter return twice, plus it can do multiple searches at once.


#!/usr/bin/perl -w

$filter = "MacOSX";
$browser = "OmniWeb";

if(!@ARGV)
{
print "Search string: ";
chomp($keyword = <STDIN>);
@args = split ' ', $keyword;
}
else
{@args = @ARGV}

for my $search (@args)
{
$url = "http://www.versiontracker.com/mp/new_search.m?productDB=mac&mode=Quick&OS_Filter=".$filter."&search=".$search;
$todo = "\'Tell application \"$browser\"\\nactivate\\ngetURL \"$url\"\\nend tell\'";
system("/usr/bin/osascript -l AppleScript -e $todo");
}



[ Reply to This | # ]