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


Click here to return to the 'better - just use' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
better - just use
Authored by: bhines on Jun 04, '02 05:49:45PM
There is an app called "launch" in Fink that will be much faster than this. launch lets you do: launch -l http://www.cnn.com/ "fink install launch" to get it. (it's even in the stable tree) Or you can get it from its web site:
launch-1.0a9-2: Replacement for OS X "open" command.
 launch is a replacement for "open" which:
 * Opens URLs, directly or in your preferred helper application.
 * Lets you specify applications by their four-char creator (e.g. 'ToyS') or Java-style
  bundle ID (e.g. com.apple.scripteditor), both of which allow you to move or rename an app.
 * Asks applications to print documents, something the OS X Finder is missing.
 * Launches applications in the background, or launches Carbon applications in Classic.
 * Shows info about any item on disk, including its file type, creator, data and resource fork sizes, dates and bundle ID.
 .
 Web site: http://web.sabi.net/nriley/software/


[ Reply to This | # ]
launch works for me
Authored by: Titanium Man on Jun 05, '02 12:37:14AM

I couldn't get the Applescript to work, but got launch to work. Here are a few possiblities of things you can do (launch will open them in your specified default browser):

#! /bin/sh

launch="/sw/bin/launch"
echo="/bin/echo"
sed="usr/bin/sed"

launch -l http://www.google.com/search\?hl=en\&q=$(echo "$*" | sed 'y/ /+/')


#! /bin/sh

launch="/sw/bin/launch"
echo="/bin/echo"
sed="usr/bin/sed"

launch -l http://whatis.techtarget.com/wsearchResults/1,290214,sid9,00.html?query=$(echo "$*" | sed 'y/ /+/')


/sw/bin/launch -l http://www.dictionary.com/search\?q="$*"

The first two shell scripts will look up a string on Google and Whatis.com respectively. The 'sed' bit takes spaces from your search string and inserts a + which is how it would appear if you had typed in a search string on the website. The last bit can be used as an alias to look up a word at dictionary.com (ie:
alias stupidalias='/sw/bin/launch -l http://www.dictionary.com/search\?q="$*"'
for bash or
alias stupidalias '/sw/bin/launch -l http://www.dictionary.com/search\?q="$*"'
for tcsh) Just my 2 cents.



[ Reply to This | # ]